遇到internal/modules/cjs/loader.js:584 throw err; ^ Error: Cannot find module 'unpipe'错误方法
PS H:\Vue代码\day6\02.webpack-vue1> npm run dev> 02.webpack-vue1@1.0.0 dev H:\Vue代码\day6\02.webpack-vue1> webpack-dev-server --open --port 3000 --contentBase src --hotinternal/modules/cjs/...
·
PS H:\Vue代码\day6\02.webpack-vue1> npm run dev
> 02.webpack-vue1@1.0.0 dev H:\Vue代码\day6\02.webpack-vue1
> webpack-dev-server --open --port 3000 --contentBase src --hot
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module 'unpipe'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (H:\Vue代码\day6\02.webpack-vue1\node_modules\_finalhandler@1.1.2@finalhandler\index.js:20:14)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! 02.webpack-vue1@1.0.0 dev: `webpack-dev-server --open --port 3000 --contentBase src --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the 02.webpack-vue1@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\可视化内容软件\nodejs\node_cache\_logs\2019-11-30T12_09_26_238Z-debug.log
错误信息如上,一开始报的错误是
'webpack-dev-server' is not recognized as an internal or external command,
我还纳闷,不是安装过webpack-dev-server么,为何不识别,然后我又安装一遍发现报的就是上面这个584错误,解决方法如下:
1、强制永久删除node_modules文件夹,只是点删除就说需要管理员权限
2、输入命令 npm install
即可
更多推荐
已为社区贡献1条内容
所有评论(0)