Module build failed: Error: `sass-loader` requires `node-sass` >=4. Please install a compatible version

前端 未结 9 1298

Can you help me? I got this error when I hit ng s

ERROR in ./src/styles.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modul         


        
相关标签:
9条回答
  • 2021-02-19 10:22

    You need to run npm rebuild (or npm rb) in your project folder.

    This command runs the npm build command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary.

    Source

    0 讨论(0)
  • 2021-02-19 10:25

    This worked for me

    npm install --save-dev node-sass
    
    0 讨论(0)
  • 2021-02-19 10:27

    npm rebuild node-sass --force : should work

    0 讨论(0)
提交回复
热议问题