You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] npm ci not working after successful npm install #8777
When I run npm install I successful install my project's dependencies. When I run npm ci afterwards, I get an error:
$ npm ci
npm error code EBADPLATFORM
npm error notsup Unsupported platform for sass-embedded-all-unknown@1.93.3: wanted {"cpu":"!arm,!arm64,!riscv64,!x64"} (current: {"cpu":"x64"})
npm error notsup Valid cpu: !arm,!arm64,!riscv64,!x64
npm error notsup Actual cpu: x64
npm error A complete log of this run can be found in: /home/jake/.npm/_logs/2025-11-25T00_29_19_394Z-debug-0.log
I initially thought this was an issue with sass-embedded, but I've since learned that this is likely a bug with npm itself: sass/embedded-host-node#404
I would like to continue using npm ci in my ci pipelines if that is still the suggested method (which makes sense to me based on recent descriptions I've received), but until this is resolved, I will need to use npm install directly with my CI pipelines. I'm not sure why the optional dependency is not treated as such when using the npm ci command.
Expected Behavior
Running npm ci after a successful npm install should not error out.
@jakehockey10 , can you try replicating this problem on the latest version of npm? (ie. npm i -g npm). If you find that the issue is reoccurring please provide more details such as package.json, npm config and steps to reproduce.
Sorry if this wasn't clear, but I was using the latest version of npm when this error occurred. The work around seems to be downgrading a full major version to 10, but that is the workaround, not where I'm getting the error. Please let me know if I am misunderstanding you in any way.
@TobiTenno I have also been experiencing that for a while now too. My workaround has been to submit my PR, get npm ci to fail in CI, then go back to my local repo and delete node_modules and package-lock.json, run npm install again and commit any changes that come out of that. That was working for a while, but I agree that npm i and npm ci were both out of sync with each other. However, this is an outright error that I'm getting because "something" is misunderstanding my platform all of the sudden. It may be related, but I'm not sure this is a duplicate of #8726 . That's just my two sense, but I've never understood how npm works enough to speak confidently on what's going on with it, ever.
Some additional information: If I go back to NPM 11 and run npm install twice in a row, the following happens:
first run package-lock.json shows up with changes
second run package-lock.json no longer has changes
npm ci on CI will claim that my package.json and package-lock.json are out of sync.
INSTEAD, if I run npm install one time, get a package-lock.json file to show changes in git, commit those changes, and then watch the CI pipeline, I'm back to the original error I reported in this ticket.
Changing my CI pipeline to just use npm install is a workaround for this. But it feels like I'm just ignoring the problem and not getting what I want to get out of npm ci and why it exists in the first place.
@liamcmitchell thanks for the response. I was able to reproduce the issue. I created a new project, added DevExtreme, as well as a few other dependencies. I then deleted my package-lock.json file and node_modules folder, ran npm install and then npm ci and was able to reproduce the problem. To re-iterate, after using the Angular CLI to create the project and adding the dependencies, npm ci was working fine. Only after I deleted the package-lock.json and node_modules folders entirely and re-installing using npm install did the issue start happening again.
Please let me know what else I need to share in terms of reproduction, and I'll be happy to. For now, here is what I think is necessary to reproduce this:
Activity
jakehockey10 commentedon Nov 25, 2025
This issue is resolved by downgrading npm to 10 instead of 11.
v-mragunandhan24 commentedon Nov 27, 2025
@jakehockey10 , can you try replicating this problem on the latest version of
npm? (ie.npm i -g npm). If you find that the issue is reoccurring please provide more details such as package.json, npm config and steps to reproduce.jakehockey10 commentedon Nov 29, 2025
Sorry if this wasn't clear, but I was using the latest version of npm when this error occurred. The work around seems to be downgrading a full major version to 10, but that is the workaround, not where I'm getting the error. Please let me know if I am misunderstanding you in any way.
TobiTenno commentedon Dec 1, 2025
seems (to me) very similar to #8726? I'm able to see this happening from dependabot
jakehockey10 commentedon Dec 1, 2025
@TobiTenno I have also been experiencing that for a while now too. My workaround has been to submit my PR, get npm ci to fail in CI, then go back to my local repo and delete node_modules and package-lock.json, run npm install again and commit any changes that come out of that. That was working for a while, but I agree that npm i and npm ci were both out of sync with each other. However, this is an outright error that I'm getting because "something" is misunderstanding my platform all of the sudden. It may be related, but I'm not sure this is a duplicate of #8726 . That's just my two sense, but I've never understood how npm works enough to speak confidently on what's going on with it, ever.
jakehockey10 commentedon Dec 1, 2025
Some additional information: If I go back to NPM 11 and run
npm installtwice in a row, the following happens:npm cion CI will claim that my package.json and package-lock.json are out of sync.INSTEAD, if I run
npm installone time, get a package-lock.json file to show changes in git, commit those changes, and then watch the CI pipeline, I'm back to the original error I reported in this ticket.Changing my CI pipeline to just use
npm installis a workaround for this. But it feels like I'm just ignoring the problem and not getting what I want to get out ofnpm ciand why it exists in the first place.liamcmitchell commentedon Dec 8, 2025
I don't see the exact version used anywhere in this issue.
Please use npm >= 11.6.3 to generate package-lock and when installing in CI. See problems with lower versions.
jakehockey10 commentedon Dec 8, 2025
I'm sorry for not specifying in the ticket the exact version. I've seen the issue on 11.6.3 and 11.6.4.
I promise you, using the latest npm is not solving the issue. Completely ignoring and not using the npm ci command is my only workaround
liamcmitchell commentedon Dec 8, 2025
OK, sorry that didn't help.
It would be helpful for anyone else looking into this if you can specify the exact version and provide minimal reproduction steps in the description.
jakehockey10 commentedon Dec 8, 2025
@liamcmitchell thanks for the response. I was able to reproduce the issue. I created a new project, added DevExtreme, as well as a few other dependencies. I then deleted my package-lock.json file and node_modules folder, ran
npm installand thennpm ciand was able to reproduce the problem. To re-iterate, after using the Angular CLI to create the project and adding the dependencies, npm ci was working fine. Only after I deleted the package-lock.json and node_modules folders entirely and re-installing usingnpm installdid the issue start happening again.Please let me know what else I need to share in terms of reproduction, and I'll be happy to. For now, here is what I think is necessary to reproduce this:
$ ng version _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| |___/ Angular CLI: 20.3.13 Node: 22.21.1 Package Manager: npm 11.6.4 OS: linux x64 Angular: 20.3.15 ... common, compiler, compiler-cli, core, forms ... platform-browser, router Package Version ------------------------------------ @angular-devkit/architect 0.2003.13 @angular-devkit/core 20.3.13 @angular-devkit/schematics 20.3.13 @angular/build 20.3.13 @angular/cli 20.3.13 @schematics/angular 20.3.13 rxjs 7.8.2 typescript 5.9.3 $ npm -v 11.6.4 $ node -v v22.21.1 $ cat package.json { "name": "delete-me", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "watch": "ng build --watch --configuration development", "test": "ng test", "lint": "ng lint", "build-themes": "devextreme build", "postinstall": "npm run build-themes" }, "prettier": { "printWidth": 100, "singleQuote": true, "overrides": [ { "files": "*.html", "options": { "parser": "angular" } } ] }, "private": true, "dependencies": { "@angular/common": "^20.3.0", "@angular/compiler": "^20.3.0", "@angular/core": "^20.3.0", "@angular/forms": "^20.3.0", "@angular/platform-browser": "^20.3.0", "@angular/router": "^20.3.0", "@fingerprintjs/fingerprintjs-pro-angular": "^2.1.0", "devextreme": "^25.1.7", "devextreme-angular": "^25.1.7", "devextreme-exceljs-fork": "^4.4.4", "devextreme-schematics": "^1.12.2", "file-saver-es": "^2.0.5", "jspdf": "^3.0.4", "libphonenumber-js": "^1.12.31", "ngx-avatars": "^1.10.1", "ngxtension": "^7.0.2", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zod": "^4.1.13" }, "devDependencies": { "@angular/build": "^20.3.12", "@angular/cli": "^20.3.12", "@angular/compiler-cli": "^20.3.0", "@types/file-saver-es": "^2.0.3", "@types/jasmine": "~5.1.0", "angular-eslint": "21.0.1", "concurrently": "^9.2.1", "devextreme-cli": "^1.12.2", "devextreme-themebuilder": "^25.1.7", "eslint": "^9.39.1", "firebase-tools": "^14.27.0", "husky": "^9.1.7", "jasmine-core": "~5.9.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", "prettier": "^3.7.4", "typescript": "~5.9.2", "typescript-eslint": "8.46.4" } } $ npm list delete-me@0.0.0 /home/jake/Code/delete-me ├── @angular/build@20.3.13 ├── @angular/cli@20.3.13 ├── @angular/common@20.3.15 ├── @angular/compiler-cli@20.3.15 ├── @angular/compiler@20.3.15 ├── @angular/core@20.3.15 ├── @angular/forms@20.3.15 ├── @angular/platform-browser@20.3.15 ├── @angular/router@20.3.15 ├── @bufbuild/protobuf@2.10.1 extraneous ├── @fingerprintjs/fingerprintjs-pro-angular@2.1.0 ├── @types/file-saver-es@2.0.3 ├── @types/jasmine@5.1.13 ├── angular-eslint@21.0.1 ├── colorjs.io@0.5.2 extraneous ├── concurrently@9.2.1 ├── devextreme-angular@25.1.7 ├── devextreme-cli@1.12.2 ├── devextreme-exceljs-fork@4.4.4 ├── devextreme-schematics@1.12.2 ├── devextreme-themebuilder@25.1.7 ├── devextreme@25.1.7 ├── eslint@9.39.1 ├── file-saver-es@2.0.5 ├── firebase-tools@14.27.0 ├── husky@9.1.7 ├── jasmine-core@5.9.0 ├── jspdf@3.0.4 ├── karma-chrome-launcher@3.2.0 ├── karma-coverage@2.2.1 ├── karma-jasmine-html-reporter@2.1.0 ├── karma-jasmine@5.1.0 ├── karma@6.4.4 ├── less@4.4.2 extraneous ├── libphonenumber-js@1.12.31 ├── needle@3.3.1 extraneous ├── ngx-avatars@1.10.1 ├── ngxtension@7.0.2 ├── parse-node-version@1.0.1 extraneous ├── prettier@3.7.4 ├── rxjs@7.8.2 ├── sass-embedded-linux-x64@1.93.3 extraneous ├── sass-embedded@1.93.3 extraneous ├── sax@1.4.3 extraneous ├── sync-child-process@1.0.2 extraneous ├── sync-message-port@1.1.3 extraneous ├── tslib@2.8.1 ├── typescript-eslint@8.46.4 ├── typescript@5.9.3 └── zod@4.1.13Changing installation method in CI pipelines due to npm bug
Changing installation method in CI pipelines due to npm bug
Saibamen commentedon Feb 19, 2026
Should be fixed with #8981.
Please update your NPM to version >= 11.10.1:
npm install -g npm@latestChanging installation method in publish pipeline due to npm bug
Changing installation method in publish pipeline due to npm bug
npm ci issue fixed since npm v11.10.1
npm ci issue fixed since npm v11.10.1
fix: clean lockfile regen drops stray @esbuild/openharmony-arm64 0.28