Skip to content
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

Update V1 to V2 - Error: Cannot find module 'node-sass' #10087

Closed
MaralS opened this issue Nov 22, 2018 · 2 comments
Closed

Update V1 to V2 - Error: Cannot find module 'node-sass' #10087

MaralS opened this issue Nov 22, 2018 · 2 comments
Labels
type: question or discussion Issue discussing or asking a question about Gatsby

Comments

@MaralS
Copy link

MaralS commented Nov 22, 2018

Description

When I try to to "yarn develop", I'm getting this error.


 error  in ./src/components/molecules/navigation/navigation.scss

Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Cannot find module 'node-sass'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (D:\Maral Sabbagh\Documents\Sites\maralsabbagh\node_modules\v8-compile-cache\v8-compile-cache.js:159:
20)
    at Object.sassLoader (D:\Maral Sabbagh\Documents\Sites\maralsabbagh\node_modules\sass-loader\lib\loader.js:46:72
)

 @ ./src/components/molecules/navigation/navigation.scss 2:14-506 21:1-42:3 22:19-511
 @ ./src/components/molecules/navigation/navigation.js
 @ ./src/components/molecules/navigation/index.js
 @ ./src/components/molecules/index.js
 @ ./src/pages/contact.js
 @ ./.cache/sync-requires.js
 @ ./.cache/app.js
 @ multi (webpack)-hot-middleware/client.js?path=/__webpack_hmr&reload=true&overlay=false D://Maral Sabbagh//Documents//Sites//maralsabbagh//.cache//app``` 

I tried to upgrade every gatsby dependencies, I followed the guideline. I don't know why I have this error.
Every help will be appreciated.
@pieh
Copy link
Contributor

pieh commented Nov 22, 2018

Did you install node-sass - it was moved to peer dependency - https://www.gatsbyjs.org/packages/gatsby-plugin-sass/#v200

@pieh pieh added the type: question or discussion Issue discussing or asking a question about Gatsby label Nov 22, 2018
@MaralS
Copy link
Author

MaralS commented Nov 22, 2018

@pieh I installed it without the --save-dev flag, that's why I had numerous issues. I installed as a dev dependency and it works now thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question or discussion Issue discussing or asking a question about Gatsby
Projects
None yet
Development

No branches or pull requests

2 participants