-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
priority: mediumMedium Priority (not high, not low priority)Medium Priority (not high, not low priority)scope: nodeIssues related to Node, Express, NestJS support for NxIssues related to Node, Express, NestJS support for Nxtype: bug
Description
Current Behavior
After building an app which references an npm package juice the generated package-lock.json seems invalid.
Original package-lock.json contains the following reference:
"node_modules/web-resource-inliner/node_modules/dom-serializer/node_modules/domhandler"
But the generated package-lock.json drops this reference for some reason and thus the npm ci fails.
Expected Behavior
npm ci should succeed when run against the generated package.json
GitHub Repo
No response
Steps to Reproduce
npx create-nx-workspace- √ Where would you like to create your workspace? · org
- √ Which stack do you want to use? · node
- √ What framework should be used? · none
- √ Integrated monorepo, or standalone project? · standalone
- √ Would you like to generate a Dockerfile? [https://docs.docker.com/] · No
- √ Which CI provider would you like to use? · skip
- √ Would you like remote caching to make your build faster? · skip
cd orgnpm i juicenpm ci# This succeedsprintf "import juice from \"juice\"; console.log(juice('foobar'));" >> src/main.tsnpm run buildcd dist/orgnpm ci# This fails
Nx Report
NX Report complete - copy this into the issue template
Node : 20.17.0
OS : win32-x64
Native Target : x86_64-windows
npm : 10.8.2
nx : 19.8.0
@nx/js : 19.8.0
@nx/jest : 19.8.0
@nx/linter : 19.8.0
@nx/eslint : 19.8.0
@nx/workspace : 19.8.0
@nx/devkit : 19.8.0
@nx/esbuild : 19.8.0
@nx/eslint-plugin : 19.8.0
@nx/node : 19.8.0
@nrwl/tao : 19.8.0
typescript : 5.5.4
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/pluginFailure Logs
npm error code EUSAGE
npm error
npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm error
npm error Invalid: lock file's [email protected] does not satisfy [email protected]
npm error Invalid: lock file's [email protected] does not satisfy [email protected]
npm error
npm error Clean install a project
npm error
npm error Usage:
npm error npm ci
npm error
npm error Options:
npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
npm error Run "npm help ci" for more infoPackage Manager Version
No response
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
Workaround is to install the missing npm package after build e.g.
cd dist/orgnpm ci# This failsnpm i [email protected]npm ci# Now this succeeds
motabass, fhawkes, simhnna and callumthomson
Metadata
Metadata
Assignees
Labels
priority: mediumMedium Priority (not high, not low priority)Medium Priority (not high, not low priority)scope: nodeIssues related to Node, Express, NestJS support for NxIssues related to Node, Express, NestJS support for Nxtype: bug