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 18.18 image installation errors in circleci #1969

Open
Capez opened this issue Sep 20, 2023 · 5 comments
Open

Node 18.18 image installation errors in circleci #1969

Capez opened this issue Sep 20, 2023 · 5 comments

Comments

@Capez
Copy link

Capez commented Sep 20, 2023

Environment

  • Platform: Ubuntu
  • Docker Version: 19.03.13
  • Node.js Version:
  • Image Tag: node:18-bullseye-slim

Expected Behavior

Successfully running docker build with yarn install command on node base image in circleci

Current Behavior

error An unexpected error occurred: "/usr/app/node_modules/@/apollo-client/node_modules/dd-trace, /usr/app/node_modules/@/nestjs-logger/node_modules/dd-trace: Cannot read properties of undefined (reading 'config')".

An unexpected error occurred: "/root/project/node_modules/husky: Cannot read properties of undefined (reading 'config')".

Error being seen among various packages during installation

Possible Solution

Rollback changes to node:18-bullseye-slim, works on on 18.17

Steps to Reproduce

ARG NODE_IMAGE=node:18-bullseye-slim

FROM $NODE_IMAGE

ARG GITHUB_ACCESS_TOKEN=

WORKDIR /usr/app

COPY ./packages       ./packages
COPY ./src            ./src
COPY .npmrc .yarnrc package.json yarn.lock ./

RUN yarn install --frozen-lockfile --production

COPY ./public         ./public
COPY docker-entrypoint.sh tsconfig.build.json tsconfig.json ./

RUN yarn build

Additional Information

This error appeared today for images, was working fine yesterday

@LaurentGoderre
Copy link
Member

Can you try this: https://stackoverflow.com/a/75827486

@rafahuaman
Copy link

rafahuaman commented Sep 20, 2023

Experiencing the same issue.
We are also using node 18 in CircleCI.
I'm also using dd-trace
An unexpected error occurred: "/build/node_modules/dd-trace: Cannot read properties of undefined (reading 'config')".

Update: pinning to node:18-alpine3.16 solves the issue in our pipelines

@Capez
Copy link
Author

Capez commented Sep 21, 2023

https://stackoverflow.com/a/75827486

that did not fix it

@rohit-techolution
Copy link

Please have a pr with https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md fix in node 18

@Capez
Copy link
Author

Capez commented Sep 25, 2023

Please have a pr with https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md fix in node 18

can you elaborate? we need to add this to the dockerfile for the node:18-bullseye-slim image?

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