0

I have deployed many webapps using Yeoman, Grunt and Bower. Recently, though, when I ran yo webapp, and opted in for SASS, although it built successfully, it gave the following error in the top right corner of my screen (MAC OS 10.10.5):

enter image description here

(Expanded message):

enter image description here

I could still run the webapp with grunt serve, and it was functioning, although whenever I tried to change the relevant path in my main.scss, something would automatically change it back upon saving, and the above error message would return.

In an effort to resolve this, I tried reinstalling npm, node, bower and grunt. After no effect, I tried completely uninstalling node and npm as per this answer, and then reinstalling from fresh. My npm version is 2.14.3 and my node version is 4.1.0.

Now, I am completely unable to deploy a webapp using yo webapp. Here is the error, the warning seems to be related to Bower:

enter image description here

There are similar problems when running other webapps, such as the official angular webapp.

How can I resolve this situation?

Community
  • 1
  • 1
alanbuchanan
  • 3,225
  • 4
  • 30
  • 58

1 Answers1

1

It seems like the bower install step didn't go through (in both cases):

  • before you reinstall: it couldn't find bootstrap scss file (the bower install might have fail on this dependency)
  • after you reinstall: it cannot find any bower packages.

Try to run bower install.

You'll find out some errors (like you're behind some proxy or your git clone is failing ...)

If you still have a file import problem: In app/styles/main.scss, remove the comments (bower:scss and endbower).

topheman
  • 6,374
  • 4
  • 20
  • 32
  • Thanks, I reinstalled bower and that did solve some issues. However, I'm still getting that SCSS error whenever I deploy. No error messages in console. – alanbuchanan Sep 18 '15 at 13:58
  • Check the import link in your `app/styles/main.scss` , does the file called on line 4 exists (read the warning) ? – topheman Sep 18 '15 at 14:02
  • Yes, so I change it to `@import "../../bower_components/bootstrap-sass/assets/stylesheets/_bootstrap.scss";` which works fine, until I save, at which point something is automatically reverting that line to `@import "bower_components/bootstrap-sass/assets/stylesheets/_bootstrap.scss";` and the error message persists – alanbuchanan Sep 18 '15 at 14:06
  • For your file import problem: In `app/styles/main.scss`, remove the comments (`bower:scss` and `endbower`). – topheman Sep 18 '15 at 14:21