Skip to content

ENOENT and can't find module on 4.0.0 while running gulp serve #2130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
eduardoRoth opened this issue Aug 8, 2016 · 6 comments · Fixed by #2131
Closed
1 task done

ENOENT and can't find module on 4.0.0 while running gulp serve #2130

eduardoRoth opened this issue Aug 8, 2016 · 6 comments · Fixed by #2131

Comments

@eduardoRoth
Copy link

I've just updated to the new version 4.0.0 and after I create a new project and try to run it I get the following errors (aside a bunch of ESLint warnings and errors):

Error: ENOENT: no such file or directory, stat '/Users/eduardoroth/.../client/index.html'

ERROR in Cannot find module 'node-sass'
@ ./client/app/app.scss 4:14-120

This happens also with LESS (cannot find module less).

I'm not sure if something is wrong with my system, but I've just updated the generator created a new project and tried to run it.

  • I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 4.0.0
Node 4.4.7
npm 3.10.5
Operating System OS X 10.11.6
Item Answer
Transpiler Babel
Flow Types No
Markup HTML
CSS SCSS
Router ui-router
Client Tests Mocha
DB MongoDB
Auth Y
Social Facebook
@Awk34
Copy link
Member

Awk34 commented Aug 8, 2016

can you confirm whether or not node-sass is install locally?

$ npm list --depth=0 | grep node-sass

@eduardoRoth
Copy link
Author

@Awk34 I ran the command that you suggested but it returned nothing, after that I ran

sudo npm i -g node-sass

To make sure I had node-sass installed, and ran again your command and it returned nothing.

I tried to gulp serve a new project and got the same error

Error: ENOENT: no such file or directory, stat '/Users/eduardoroth/webapps/PiperCode/Biospa/client/index.html'
    at Error (native)
GET / 404 25.212 ms - 154
finished populating users
webpack: wait until bundle finished: /
webpack done hook
Hash: 6313a0671ff0c155685f
Version: webpack 1.13.1
Time: 8729ms
                  Asset     Size  Chunks             Chunk Names
          app.bundle.js   243 kB       0  [emitted]  app
    polyfills.bundle.js   206 kB       1  [emitted]  polyfills
       vendor.bundle.js  2.44 MB       2  [emitted]  vendor
      app.bundle.js.map   295 kB       0  [emitted]  app
polyfills.bundle.js.map   269 kB       1  [emitted]  polyfills
   vendor.bundle.js.map  2.85 MB       2  [emitted]  vendor
   ../client/index.html  1.39 kB          [emitted]  

ERROR in Cannot find module 'node-sass'
 @ ./client/app/app.scss 4:14-120
Child html-webpack-plugin for "../client/index.html":
                   Asset     Size  Chunks       Chunk Names
    ../client/index.html  2.69 kB       0       
webpack: bundle is now VALID.
GET /service-worker.js 200 7.499 ms - -

@Awk34
Copy link
Member

Awk34 commented Aug 8, 2016

How about just this:

$ npm list --depth=0

from the root directory of your scaffolded project

@Awk34
Copy link
Member

Awk34 commented Aug 8, 2016

I think this is a bug. sass-loader instructs you to install node-sass alongside it. So to fix this for now, do

$ npm install --save-dev node-sass

@eduardoRoth
Copy link
Author

@Awk34 the command npm list --depth=0returned the following:

├── UNMET PEER DEPENDENCY node-sass@^3.4.2

After I ran npm install --save-dev node-sass the project worked.

It seems to be a bug then.

@rohanshar
Copy link

I got this error. The fix mentioned in comments worked for me. This issue is closed which seems wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants