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

[BUG] dev true is flaky #6521

Open
2 tasks done
robertIsaac opened this issue Jun 2, 2023 · 0 comments
Open
2 tasks done

[BUG] dev true is flaky #6521

robertIsaac opened this issue Jun 2, 2023 · 0 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release

Comments

@robertIsaac
Copy link

robertIsaac commented Jun 2, 2023

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

when there is same dependency marked as both devDependency and a dependency at the same time, the package-lock.json start become flaky, sometimes it list it with dev: true and some other times it doesn't
which causes conflicts in our repo, because of incorrect changes were made

Expected Behavior

if a package is both dependency and devDependency, not to be marked as "dev": true in the package-lock.json

Steps To Reproduce

  1. generate new nx angular project npx create-nx-workspace
  2. choose angular, then nothing matter, but to be thoroughly I choose these answers standalone, css, yes, no, no`
  3. run npm i multiple times and check after each time if package-lock.json file changed

the cause of the error is @nx/angular see nrwl/nx#6885
it's installed as production dependency instead of dev dependency
you can see here https://github.com/nrwl/nx/blob/master/packages/angular/package.json it has a lot of what normally are dev dependencies as direct dependencies or peer dependencies, very obvious examples are @nx/linter and @nx/jest which are installed as a dev dependencies in the project root package.json

Environment

  • npm: 9.6.7
  • Node.js: v18.16.0
  • OS Name: Windows 11
  • npm config:
; "user" config from C:\Users\rober\.npmrc

script-shell = "C:\\Users\\rober\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe"

; node bin location = C:\Program Files\nodejs\node.exe
; node version = v18.16.0
; npm local prefix = C:\Users\rober\WebstormProjects\daemon-process-terminated-reprod
; npm version = 9.6.7
; cwd = C:\Users\rober\WebstormProjects\daemon-process-terminated-reprod\src\app
; HOME = C:\Users\rober
@robertIsaac robertIsaac added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release
Projects
None yet
Development

No branches or pull requests

1 participant