错误日志信息:如果它以ok 1详细的cli 'C:\Program \nodejs\node.exe结束,一个详细的cli 'C:\Users\wf70\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',1详细的cli 'install',一个详细的cli‘-保存-dev’,则它工作了0 info。1详细的cli 'webpack‘2信息使用npm@5.0.1 3 info使用节点@v6.10.2 4傻安装loadCurrentTree 5傻安装readLocalPackageData 6 http fetch 4 0 0 https://registry.npmjs.org/webpack 2 3 is 7愚蠢fetchPackageMetaData错误(数据无效)。webpack@最新的8条详细堆栈错误: 400坏请求(数据无效)。):webpack@最新的8详细堆栈在(C:\Users\wf70\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:36:19) 8详细堆栈在tryCatcher (C:\Users\wf70\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23) 8详细堆栈在Promise._settlePromiseFromHandler (C:\Users\wf70 70\AppData)\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31) 8详细堆栈在Promise._settlePromise (C:\Users\wf70\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18) 8 Promise._settlePromise0 (C:\Users\wf70\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js详细堆栈:614:10) 8 (C:\Users\wf70\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)上的详细堆栈8 Async._drainQueue的详细堆栈Async._drainQueue 8 Async._drainQueues上的详细堆栈(C:\Users\wf70 70\AppData)\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10) 8详细堆栈在Immediate.Async.drainQueues (C:\Users\wf70\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14) 8详细堆栈在runCallback (timers.js:666:20) 8详细堆栈在tryOnImmediate (timers.js:639:5) 8详细堆栈在processImmediate immediateCallback9详细cwd D:\2017\ReactJSProject 10详细Windows_NT 6.1.7601 11详细论证“C:程序Files\nodejs\node.exe”“安装”--保存-dev "webpack“12详细节点v6.10.2 13详细NPMv5.0.1 14错误代码E400 15错误400坏请求(数据无效)。):webpack@最新16详细出口1,true
发布于 2019-07-09 00:56:22
尝试以下几点:
备选案文1
npm uninstall -g webpack@latest
npm cache clean
npm config set strict-ssl false
npm install -g webpack@latest
或:
选项2
npm uninstall -g webpack@latest
npm cache clean
npm config set proxy="http://proxy.example.com:8080"
npm config set https-proxy="http://proxy.example.com:8080"
npm config set strict-ssl false
npm install -g webpack@latest
如果你知道错误的原因:写EPROTO尝试,
npm config set proxy="http://proxy.example.com:8080"
npm config set https-proxy="http://proxy.example.com:8080"
遵循备选方案2
如果所有这些都失败了,请尝试安装节点和npm的最新稳定版本。
https://stackoverflow.com/questions/44320240
复制相似问题