在win下开发的node工程,在linux下用dockerfile部署时,遇到npm install时报错
Step 8/9 : RUN npm install ---> Running in 2efaeba0750a npm ERR! code E404 npm ERR! 404 Not Found: event-stream@3.3.6 npm WARN tar ENOENT: no such file or directory, open '/app/node_modules/.staging/typescript-2d0ca0bc/lib/typescriptServices.d.ts' npm WARN tar ENOENT: no such file or directory, open '/app/node_modules/.staging/undefsafe-f651b95e/.jscsrc' npm WARN tar ENOENT: no such file or directory, open '/app/node_modules/.staging/undefsafe-f651b95e/.jshintrc' npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-12-11T02_14_33_429Z-debug.log
删除package-lock.json之后就没问题了。
暂时在.gitignore里屏蔽package-lock.json了,暂时没发现问题