所以,我在docker容器中更新了npm,因为我有节点版本6.9.4,所以npm被破坏了。任何npm命令都会抛出此错误。
client | module.js:471
client | throw err;
client | ^
client |
client | Error: Cannot find module 'process-nextick-args'
client | at Function.Module._resolveFilename (module.js:469:15)
client | at Function.Module._load (module.js:417:25)
client | at Module.require (module.js:497:17)
client | at require (internal/module.js:20:19)
client | at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:26:23)
client | at Module._compile (module.js:570:32)
client | at Object.Module._extensions..js (module.js:579:10)
client | at Module.load (module.js:487:32)
client | at tryModuleLoad (module.js:446:12)
client | at Function.Module._load (module.js:438:3)
我想将npm降级到3.10.10。 有没有办法在不重新创建容器的情况下执行此操作? 我正在使用docker-compose。