small medium large xlarge

Generic-user-small
24 Jun 2017, 17:09
Adewole Mayowa (6 posts)

I’m on Chapter 6 of this book. Building a Dynamic UI with Angular. After installing Angular with Webpacker I got this error. Can’t find application.css in ~/shine/public/packs/manifest.json. Is webpack still compiling?

After adding this line //”application.css”: “http://0.0.0.0:8080/packs/application.css”, to manifest.json the error was gone but bootstrap stopped working afterwards. Which means this line in application.html.erb stopped working <%= stylesheet_pack_tag ‘application’ %>

After commenting out this line - <%#= stylesheet_pack_tag ‘application’ %> in application.html.erb the page loaded with a long list on error in the console.

Here’s an example

Uncaught Error: Module build failed: ModuleBuildError: Module build failed: Error: ENOENT: no such file or directory, scandir ‘/Users/mayor/shine/node_modules/node-sass/vendor’

./~/css-loader?{“minimize”:false}!./~/postcss-loader/lib?{“sourceMap”:true}!./~/resolve-url-loader!./~/sass-loader/lib/loader.js?{“sourceMap”:true}!./app/javascript/packs/application.css Module build failed: Error: ENOENT: no such file or directory, scandir ‘/Users/mayor/shine/node_modules/node-sass/vendor’

How can I fix this?

Dmfcb_pragsmall
24 Jun 2017, 19:01
David Copeland (476 posts)

Can you post a link to your app’s source code somewhere?

Generic-user-small
24 Jun 2017, 22:33
Adewole Mayowa (6 posts)

Here’s the link to the src code - https://github.com/mayordwells/shine

Dmfcb_pragsmall
24 Jun 2017, 22:48
David Copeland (476 posts)

I responded on twitter, but this works for me.

I cloned the repo, did bundle install, then yarn install, then started the app with foreman start

I uncommented the stylesheet_pack_tag and that brought in the CSS no problem.

If you aren’t running foreman start, but are just running rails s, it won’t work, because the webpack dev server needs to be running.

If you are running foreman start, then look at the output—maybe webpack is messed up somehow. Webpack, if it encounters an error, will just keep running and not exit, so you have to look at the output carefully to see.

Generic-user-small
25 Jun 2017, 07:32
Adewole Mayowa (6 posts)

I’m still getting the same error, I have no idea why. I’ll send you a screen pic of the error log from the browser on Twitter. I’ve been running foreman start since we installed foreman in chapter 1. Even running bundle install and yarn install again didn’t help. I also tried to clear the cache with rake tmp:cache:clear but that didn’t work either

Dmfcb_pragsmall
25 Jun 2017, 13:57
David Copeland (476 posts)

Can you paste the full text of the error you are getting? I can’t read the twitter pictures very well.

When you do, please use the tilde syntax so it formats it (or paste it into a gist and post a link to that)

Generic-user-small
25 Jun 2017, 20:23
Adewole Mayowa (6 posts)

Here’s the link to gist for the error log - https://gist.github.com/mayordwells/719fb402864cd2b6851eeada3d76f52c

You must be logged in to comment