Error “Cannot find module 'import-local'”报错
程序员文章站
2022-06-01 09:27:34
...
问题:在搭建项目时,npm run dev时,出现“Cannot find module 'import-local'”报错
解决办法:
由于项目中安装第三方包时,cnpm和npm混合使用,导致报错,只要把项目中的node_modules文件夹删掉,统一用cnpm install,或者npm install 重新下载第三方包,就能解决报错问题
internal/modules/cjs/loader.js:605
throw err;
^
Error: Cannot find module 'import-local'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)
at f:\git\hestia\apps\fiscal_risk\assets\node_modules\webpack-cli\bin\webpack.js:11:22
at Object.<anonymous> (f:\git\hestia\apps\fiscal_risk\assets\node_modules\webpack-cli\bin\webpack.js:515:3)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
推荐阅读
-
一次socket.error: [Errno 99] Cannot..报错排查
-
CentOS安装Nginx 报错“configure: error: the HTTP rewrite module requires the PCRE library”解决办法
-
编译PHP报错configure error Cannot find libmysqlclient under usr的解决方法
-
webpack-dev-server config.js Cannot find module
-
Linux安装Apache报错:Cannot find a valid baseurl for repo: base/7/x86_64解决方案
-
cannot find supercluster & native module cannot be null & Xcode build timeout
-
Error: ENOENT: no such file or directory, uv_cwd Error: Cannot find module
-
npm run dev 报错 ERROR in Entry module not found: Error: Can't resolve './src' in
-
【已解决】运行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'