ERROR in ./src/styles.scss .. Module build failed: Error: Cannot find module 'node-sass'

Adriano Frota

When I try to execute npm start in a new machine I have the following error:

    Time: 18322ms
chunk {main} main.js, main.js.map (main) 487 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 227 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 430 kB  [rendered]
chunk {styles} styles.js, styles.js.map (styles) 282 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 6.32 MB [initial] [rendered]

ERROR in ./src/styles.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss)
Module build failed: 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 (internal/module.js:11:18)
    at Object.sassLoader (C:\...(path)...\node_modules\sass-loader\lib\loader.js:24:22)
i 「wdm」: Failed to compile.

my Angular.json

...
 "styles": [
              "node_modules/bootstrap/dist/css/bootstrap.css",
              "node_modules/font-awesome/css/font-awesome.css",
              "node_modules/animate.css/animate.min.css",
              "src/styles.scss",
              "node_modules/ngx-toastr/toastr.css",
              "node_modules/alertify.js/dist/css/alertify.css"
            ],
...

My node version: v8.11.3 angular 5+

Sookie Singh

As the error says Error: Cannot find module 'node-sass'. To solve this you have to install node-sass using following command:

npm install node-sass

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Module build failed: Error: Cannot find module 'node-sass'

From

ERROR in Cannot find module 'node-sass'

From Dev

webpacker Uncaught Error: Module build failed / Cannot find module 'babel-plugin-syntax-dynamic-import'

From Dev

Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js)

From Dev

ERROR in ./src/app.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module '@babel/preset-present-env'

From Dev

Module Error (from ./node_modules/sass-loader/dist/cjs.js): Cannot find module 'sass'

From Dev

Error: Cannot find module 'node-jsdom

From Javascript

Heroku + Node: Cannot find module error

From Dev

Error: Cannot find module 'node-wit'

From Dev

Error: Cannot find module 'jose' in node js

From Dev

Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-preset-react'

From Dev

Error: Cannot find module './'

From Dev

Rocket.Chat build failing with error "Cannot find module '../build/Release/sharp.node' "

From Dev

Error: Cannot find module '/app/__sapper__/build' on Cloud Build

From Dev

Cannot find module 'node-sass

From Dev

Build:Cannot find module OurFirstAppWithFVisualStudio.module.scss

From Dev

How to fix this angular error "Module build failed (from ./node_modules/sass-loader/lib/loader.js):"?

From Dev

Node app in Heroku: Module build failed: Error: Unexpected "space" found

From Dev

RollupJS `resolve failed: Error: Cannot find module 'babel-runtime'`

From Dev

Error: Cannot find module 'transformer-module'

From Dev

error 'MODULE NOT FOUND', Cannot find module

From Dev

Cordova 4.3.0 - build command returns error Cannot find module 'Q'

From Dev

Error: Cannot find module '../build/Release/bson' on Mac

From Dev

Ionic build error Cannot find module './scheduler/Action'

From Dev

Error: Cannot find module 'commander'

From Dev

Error: Cannot find module 'mongodb'

From Javascript

Error: Cannot find module html

From Dev

Error: Cannot find module './args'

From Dev

Phonegap error: Cannot find module

Related Related

  1. 1

    Module build failed: Error: Cannot find module 'node-sass'

  2. 2

    ERROR in Cannot find module 'node-sass'

  3. 3

    webpacker Uncaught Error: Module build failed / Cannot find module 'babel-plugin-syntax-dynamic-import'

  4. 4

    Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js)

  5. 5

    ERROR in ./src/app.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module '@babel/preset-present-env'

  6. 6

    Module Error (from ./node_modules/sass-loader/dist/cjs.js): Cannot find module 'sass'

  7. 7

    Error: Cannot find module 'node-jsdom

  8. 8

    Heroku + Node: Cannot find module error

  9. 9

    Error: Cannot find module 'node-wit'

  10. 10

    Error: Cannot find module 'jose' in node js

  11. 11

    Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-preset-react'

  12. 12

    Error: Cannot find module './'

  13. 13

    Rocket.Chat build failing with error "Cannot find module '../build/Release/sharp.node' "

  14. 14

    Error: Cannot find module '/app/__sapper__/build' on Cloud Build

  15. 15

    Cannot find module 'node-sass

  16. 16

    Build:Cannot find module OurFirstAppWithFVisualStudio.module.scss

  17. 17

    How to fix this angular error "Module build failed (from ./node_modules/sass-loader/lib/loader.js):"?

  18. 18

    Node app in Heroku: Module build failed: Error: Unexpected "space" found

  19. 19

    RollupJS `resolve failed: Error: Cannot find module 'babel-runtime'`

  20. 20

    Error: Cannot find module 'transformer-module'

  21. 21

    error 'MODULE NOT FOUND', Cannot find module

  22. 22

    Cordova 4.3.0 - build command returns error Cannot find module 'Q'

  23. 23

    Error: Cannot find module '../build/Release/bson' on Mac

  24. 24

    Ionic build error Cannot find module './scheduler/Action'

  25. 25

    Error: Cannot find module 'commander'

  26. 26

    Error: Cannot find module 'mongodb'

  27. 27

    Error: Cannot find module html

  28. 28

    Error: Cannot find module './args'

  29. 29

    Phonegap error: Cannot find module

HotTag

Archive