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

Node, npm, package.json updates #233

Open
darpham opened this issue Aug 30, 2021 · 4 comments
Open

Node, npm, package.json updates #233

darpham opened this issue Aug 30, 2021 · 4 comments
Assignees

Comments

@darpham
Copy link
Contributor

darpham commented Aug 30, 2021

TLDR: Can we spend some time to ensure Node, npm, package.json is updated as needed.

While rebuilding the frontend container for new deployment, I ran into this npm error. I'm currently trying some workarounds, but getting a little overhaul on the above request would be great.

 > [builder 5/7] RUN npm install:
#14 6.585 npm notice
#14 6.585 npm notice New patch version of npm available! 7.21.0 -> 7.21.1
#14 6.585 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.21.1>
#14 6.585 npm notice Run `npm install -g [email protected]` to update!
#14 6.585 npm notice
#14 6.586 npm ERR! code ERESOLVE
#14 6.591 npm ERR! ERESOLVE unable to resolve dependency tree
#14 6.591 npm ERR!
#14 6.591 npm ERR! While resolving: [email protected]
#14 6.591 npm ERR! Found: [email protected]
#14 6.591 npm ERR! node_modules/react
#14 6.591 npm ERR!   react@"^16.10.1" from the root project
#14 6.592 npm ERR!
#14 6.592 npm ERR! Could not resolve dependency:
#14 6.592 npm ERR! peer react@"^15.3.2" from [email protected]
#14 6.592 npm ERR! node_modules/tableau-react
#14 6.592 npm ERR!   tableau-react@"^2.0.0-beta.0" from the root project
#14 6.592 npm ERR!
#14 6.592 npm ERR! Fix the upstream dependency conflict, or retry
#14 6.593 npm ERR! this command with --force, or --legacy-peer-deps
#14 6.593 npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
#14 6.593 npm ERR!
#14 6.593 npm ERR! See /root/.npm/eresolve-report.txt for a full report.
#14 6.604
#14 6.604 npm ERR! A complete log of this run can be found in:
#14 6.604 npm ERR!     /root/.npm/_logs/2021-08-30T06_41_16_747Z-debug.log
@darpham darpham changed the title NPM install failure - still documenting... Node, npm, package.json updates Aug 30, 2021
@darpham
Copy link
Contributor Author

darpham commented Aug 30, 2021

Trying with --legacy-peer-deps flag during npm install

@darpham
Copy link
Contributor Author

darpham commented Aug 30, 2021

Because the packages we're using are so old, they require Python version 2.x.x
Not a big issue, but once again, a package update would help alleviate this.

@darpham
Copy link
Contributor Author

darpham commented Aug 30, 2021

@alessandro-pianetta What is the current Node/npm version you're using for this project?
Can you add into package.json per documentation

@darpham
Copy link
Contributor Author

darpham commented Aug 30, 2021

I've had success after downgrading Node version in the docker image to 14.x
Here is the new Dockerfile for frontend, I'll make a new PR soon

FROM node:14 as builder

WORKDIR /srv
COPY . .

RUN npm install --legacy-peer-deps
RUN npm install -g [email protected]

ENV GATSBY_API_HOST open-disclosure.codeforsanjose.org
RUN npm run-script build

FROM nginx:1.21.1
EXPOSE 80
COPY /nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /srv/public /usr/share/nginx/html/
CMD ["nginx", "-g", "daemon off;"]

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

2 participants