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] npm link does not work correctly with workspaces and install-strategy=nested #7315

Open
2 tasks done
Lightning00Blade opened this issue Mar 26, 2024 · 0 comments
Open
2 tasks done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x

Comments

@Lightning00Blade
Copy link

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

I have two projects

Puppeteer uses this .npmrc
install-strategy=nested. packages/puppeteer-core has the chromium-bidi as a dependency.

The linked package get linked at the top level rather then on the package-level.
That mean the downloaded version is always resolved by Node.

Expected Behavior

The linked packages is placed in the correct place packages/puppeteer-core/ and runs the locally linked version.

Steps To Reproduce

  1. Download puppeteer and chromium-bidi
  2. Install dependecies in both
  3. Run npm run build in both (will build anything necessary, also prevent's an issue related to linking and peerDependencies where there are type errors)
  4. Run npm link in chromium-bidi
  5. Run npm link chromium-bidi or npm link chromium-bidi -w puppeteer-core in puppeteer
  6. Observe that the packages/puppeteer-core/node_modules/chromium-bidi is the downloaded version and not the symlink one.
  7. Observe that node_module/chromium-bidi is a symlink to chromium-bidi

Environment

  • npm: 10.5.0
  • Node.js: 20.10.0
  • OS Name: Linux
  • System Model Name: -
  • npm config:
; "project" config from /usr/local/google/home/nvitkov/puppeteer/.npmrc

access = "public" 
install-strategy = "nested" 

; node bin location = ~/.nvm/versions/node/v20.10.0/bin/node
; node version = v20.10.0
; npm local prefix = ~/puppeteer
; npm version = 10.5.0
@Lightning00Blade Lightning00Blade added Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x labels Mar 26, 2024
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 10.x
Projects
None yet
Development

No branches or pull requests

1 participant