We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
new
No response
While dockerizing angular application, npm install hangs with below logs
npm install
=> [build 4/6] RUN npm install --verbose 6.9s => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/darwin-x64 => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/darwin-arm64 => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/android-x64 => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/android-arm64 => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/android-arm => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/aix-ppc64
ng new my-app cd my-app docker build --tag myapp --platform=linux/amd64 --file Dockerfile .
docker build --tag cbdc --platform=linux/amd64 --file Dockerfile . [+] Building 9.4s (9/13) docker:rancher-desktop => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 337B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 95B 0.0s => [internal] load metadata for docker.io/nginxinc/nginx-unprivileged:latest 2.4s => [internal] load metadata for docker.io/library/node:20.11.1 2.4s => [build 1/6] FROM docker.io/library/node:20.11.1@sha256:e06aae17c40c7a6b5296ca6f942a02e6737ae61bbbf3e2158624bb0f887991b5 0.0s => [stage-1 1/2] FROM docker.io/nginxinc/nginx-unprivileged:latest@sha256:2577b782328a7d6cc311a17ba8634996d9e8221c413361e847a74 0.0s => [internal] load build context 0.0s => => transferring context: 1.03kB 0.0s => CACHED [build 2/6] WORKDIR /usr/src/build 0.0s => CACHED [build 3/6] COPY package*.json . 0.0s => [build 4/6] RUN npm install --verbose 6.9s => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/darwin-x64 => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/darwin-arm64 => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/android-x64 => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/android-arm64 => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/android-arm => => # npm verb reify failed optional dependency /usr/src/build/node_modules/@esbuild/aix-ppc64
ng version _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| |___/ Angular CLI: 17.3.2 Node: 20.11.0 Package Manager: npm 10.2.4 OS: darwin x64 Angular: 17.3.1 ... animations, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router Package Version --------------------------------------------------------- @angular-devkit/architect 0.1703.2 @angular-devkit/build-angular 17.3.2 @angular-devkit/core 17.3.2 @angular-devkit/schematics 17.3.2 @angular/cli 17.3.2 @schematics/angular 17.3.2 rxjs 7.8.1 typescript 5.4.3 zone.js 0.14.4
Dockerfile
FROM node:20.11.1 as build WORKDIR /usr/src/build COPY package*.json . RUN npm install --verbose COPY . . RUN npm run build FROM nginxinc/nginx-unprivileged:latest COPY --from=build /usr/src/build/dist/my-app/browser /usr/share/nginx/html EXPOSE 8080 CMD ["nginx", "-g", "daemon off;"]
Only way to fix this is, remove package-lock.json while doing docker build and it works without any issue.
package-lock.json
The text was updated successfully, but these errors were encountered:
This is related to npm/cli#4828 and is an NPM bug.
In short the package lock becomes platform specific when having platform specific dependencies.
As an alternative you might want to consider using an alternate package manager.
Sorry, something went wrong.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
No branches or pull requests
Command
new
Is this a regression?
The previous version in which this bug was not present was
No response
Description
While dockerizing angular application,
npm install
hangs with below logsMinimal Reproduction
ng new my-app
cd my-app
docker build --tag myapp --platform=linux/amd64 --file Dockerfile .
Exception or Error
Your Environment
Anything else relevant?
Dockerfile
workaround
Only way to fix this is, remove
package-lock.json
while doing docker build and it works without any issue.The text was updated successfully, but these errors were encountered: