Module build failed: Error: Cannot find module 'node-sass' at Function.Module._resolveFilename (
程序员文章站
2022-06-05 09:15:00
...
Module build failed: Error: Cannot find module ‘node-sass’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at getDefaultSassImpl (E:\项目\电商项目\MALL\node_modules\sass-loader\dist\index.js:198:10)
at Object.loader (E:\项目\电商项目\MALL\node_modules\sass-loader\dist\index.js:80:29)
解决办法:
使用淘宝镜像安装依赖
先全局安装淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org
在下载依赖
cnpm install
最后成功
npm run dev
上一篇: 【JS数据结构】优先级队列 PriorityQueue
下一篇: 数据结构-----优先级队列(堆)
推荐阅读
-
cannot find supercluster & native module cannot be null & Xcode build timeout
-
Error: ENOENT: no such file or directory, uv_cwd Error: Cannot find module
-
【已解决】运行webpack-dev-server时提示Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'
-
webpack5: Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
Webpack 报错:Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
webpack-dev-server 报错 Error: Cannot find module ‘webpack/bin/config-yargs‘
-
webpack——Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
【webpack-dev-server】Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
Error: Cannot find module 'webpack-cli/bin/config-yargs' at Function.Module._resolveFilename