docker报错:The command '/bin/sh -c npm install' returned a ...
之前都是好好的,现在不管怎么构建,都是报这个错,求大佬支招
Step 1/10 : FROM node:latest
---> 2d840844f8e7
Step 2/10 : MAINTAINER YW
---> Using cache
---> 6631f9f14e00
Step 3/10 : RUN rm -rf /home/projects/tlt/web
---> Using cache
---> 60a540cb51ee
Step 4/10 : RUN mkdir -p /home/projects/tlt/web
---> Using cache
---> 68c0b5da1ed5
Step 5/10 : WORKDIR /home/projects/tlt/web
---> Using cache
---> 9303483f3de8
Step 6/10 : COPY . /home/projects/tlt/web
---> Using cache
---> 16261f0a871d
Step 7/10 : RUN npm install
---> Running in 8f26bddc17d6
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: tlt@0.0.1
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.6.0" from next@9.5.5
npm ERR! node_modules/next
npm ERR! next@"^9.5.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-11-26T06_58_35_880Z-debug.log
ERROR: Service 'web' failed to build : The command '/bin/sh -c npm install' returned a non-zero code: 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以参考下这个问题的回答https://segmentfault.com/q/10...