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

Packages could not be mapped to the NPM lockfile. #28832

Open
1 of 4 tasks
dpotera opened this issue Nov 7, 2024 · 0 comments
Open
1 of 4 tasks

Packages could not be mapped to the NPM lockfile. #28832

dpotera opened this issue Nov 7, 2024 · 0 comments

Comments

@dpotera
Copy link

dpotera commented Nov 7, 2024

Current Behavior

I have npm package (with some sub-dependencies), which I'm using in nestjs app.
During build of app creation of lock file fails.
After removal of this package usage, problem is not happening.

Expected Behavior

I should be able to use npm package and lock file should be created successfully.

GitHub Repo

https://github.com/dpotera/nx-npm-example

Steps to Reproduce

  1. clone repository
  2. npm install
  3. npx nx build example-api - prints error

Nx Report

NX Report complete - copy this into the issue template

Node : 22.0.0
OS : darwin-arm64
Native Target : aarch64-macos
npm : 10.5.1

nx (global) : 20.0.0
nx : 20.0.10
@nx/js : 20.0.10
@nx/jest : 20.0.10
@nx/eslint : 20.0.10
@nx/workspace : 20.0.10
@nx/devkit : 20.0.10
@nx/eslint-plugin : 20.0.10
@nx/nest : 20.0.10
@nx/node : 20.0.10
@nx/web : 20.0.10
@nx/webpack : 20.0.10
typescript : 5.5.4

Registered Plugins:
@nx/webpack/plugin
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

nx run example-api:build [existing outputs match the cache, left as is]

webpack-cli build --node-env=production

NX An error occured while creating pruned lockfile

Please open an issue at https://github.com/nrwl/nx/issues/new?template=1-bug.yml and provide a reproduction.
To prevent the build from breaking we are returning the root lock file.
If you run npm install --package-lock-only in your output folder it will regenerate the correct pruned lockfile.

Original error: Following packages could not be mapped to the NPM lockfile:

Error: Following packages could not be mapped to the NPM lockfile:

chunk (runtime: main) main.js (main) 2.84 KiB [entry] [rendered]
webpack compiled successfully (40f57bfe94298383)

Package Manager Version

npm version 10.5.1

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants