Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose build fails with npm error #49

Open
nilp0inter opened this issue Aug 13, 2021 · 4 comments
Open

docker-compose build fails with npm error #49

nilp0inter opened this issue Aug 13, 2021 · 4 comments

Comments

@nilp0inter
Copy link

I am trying to build the project using the documented docker-compose method, but it fails with the following error:

Step 1/12 : FROM golang:alpine
 ---> cfae2977b751
Step 2/12 : WORKDIR /src
 ---> Using cache
 ---> c9e8ff511471
Step 3/12 : RUN apk add --update npm git
 ---> Using cache
 ---> 90272c3dd00c
Step 4/12 : RUN go get -u github.com/jteeuwen/go-bindata/...
 ---> Using cache
 ---> cbc745e0259a
Step 5/12 : COPY ./webapp/package.json webapp/package.json
 ---> Using cache
 ---> 6a4e12da9a92
Step 6/12 : RUN cd ./webapp &&     npm install
 ---> Running in 4dfc7f1722bb
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: featmap-client@0.1.0
npm ERR! Found: history@5.0.0
npm ERR! node_modules/history
npm ERR!   history@"^5.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer history@"^4.7.2" from connected-react-router@6.9.1
npm ERR! node_modules/connected-react-router
npm ERR!   connected-react-router@"^6.9.1" 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/2021-08-13T08_47_30_097Z-debug.log
The command '/bin/sh -c cd ./webapp &&     npm install' returned a non-zero code: 1

I successfully build it by adding --force to npm install but it doesn't seems like the optimal solution.

@MarsMan69
Copy link

Only after I deleted the file: /webapp/package-lock.json, I was able to build container successfully.

@freemanlingli
Copy link

Only after I deleted the file: /webapp/package-lock.json, I was able to build container successfully.
I delete /webapp/package-lock.json, , but error show like this , Anyboy coul help me?

#14 68.08 /src/webapp/src/components/Board.tsx
#14 68.08 TypeScript error in /src/webapp/src/components/Board.tsx(474,50):
#14 68.08 Type '{ children: Element; smallIcon: true; text: string; icon: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<WrapperInstance<Props, typeof ContextMenu>> & Readonly<...>'.
#14 68.08 Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<WrapperInstance<Props, typeof ContextMenu>> & Readonly<...>'. TS2322
#14 68.08
#14 68.08 472 | {(!this.props.viewOnly || this.props.demo) &&
#14 68.08 473 |
#14 68.08 > 474 |
#14 68.08 | ^
#14 68.08 475 |

#14 68.08 476 |

executor failed running [/bin/sh -c cd ./webapp && npm run build --force]: exit code: 1

@freemanlingli
Copy link

docker-compose build , but it fails with the following error:
I delete /webapp/package-lock.json, , but error show like this , Anybody could help me?

@mhenselin
Copy link

Yep - replace npm install with npm ci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants