欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

程序员文章站 2022-05-30 21:13:12
...
ERROR in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader!./~/sass-loader!./src/scss/style.scss
Module build failed: Error: Cannot find module 'node-sass'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (D:\Users\wb278387\ng2\ng2-admin\node_modules\sass-loader\index.js:4:12)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at loadLoader (D:\Users\wb278387\ng2\ng2-admin\node_modules\loader-runner\lib\loadLoader.js:13:17)
    at iteratePitchingLoaders (D:\Users\wb278387\ng2\ng2-admin\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
    at iteratePitchingLoaders (D:\Users\wb278387\ng2\ng2-admin\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at D:\Users\wb278387\ng2\ng2-admin\node_modules\loader-runner\lib\LoaderRunner.js:173:18
 @ ./src/scss/style.scss 4:14-203
 @ multi ./src/scss/style.scss ./~/primeng/resources/themes/omega/theme.css ./~/primeng/resources/primeng.min.css

这个问题是没有安装python导致的,之后在配置一下Python环境变量。再次npm link 就行了。

转载于:https://my.oschina.net/u/1033181/blog/878082