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

pnpm 6.23.3+ fails to install devDependency with github: protocol in a monorepo #4064

Closed
dominikg opened this issue Dec 3, 2021 · 6 comments · Fixed by #4066
Closed

pnpm 6.23.3+ fails to install devDependency with github: protocol in a monorepo #4064

dominikg opened this issue Dec 3, 2021 · 6 comments · Fixed by #4066
Milestone

Comments

@dominikg
Copy link

dominikg commented Dec 3, 2021

pnpm version: 6.23.3 +

Code to reproduce the issue:

  • clone sveltekit repo: git@github.com:sveltejs/kit.git
  • run pnpm install with pnpm >= 6.23.3 and an empty store

Expected behavior:

installation succeeds like it did in previous versions of pnpm

Actual behavior:

install fails with an ENOENT error for pnpm 6.23.3 or later

 ENOENT  ENOENT: no such file or directory, open '/home/dominikg/develop/reproductions/kit-pnpm/.pnpm-store-6.23.5/v3/tmp/_tmp_23642_a461c1c4f8a474032e2d7cac07593ba9/src/fs/fixtures/repo-3/documentation/tutorial/05-events/06-dom-event-forwarding/app-b/App.svelte'

The missing file originates in a dependency declared with github: protocol. We already tried to improve its package.json by adding a files section but it did not help.

https://github.com/sveltejs/kit/blob/master/package.json#L35
https://github.com/sveltejs/action-deploy-docs

Additional information:

  • node -v prints: 16.13.0
  • Windows, macOS, or Linux?: linux

happened for others too and also on github actions https://github.com/dominikg/svelte-vite-integration-test/runs/4401857216?check_suite_focus=true#step:12:20

here is a shell script i've used to run install with different pnpm versions and a fresh store for each

#!/bin/sh
PNPM_VER=$1
PNPM_CACHE_DIR="$PWD/.pnpm-store-$PNPM_VER"
if [ -d "$PNPM_CACHE_DIR" ]; then
	rm -rf "$PNPM_CACHE_DIR"
fi
if [ -d "node_modules" ]; then
	rm -rf "node_modules"
fi
git checkout .npmrc
echo "store-dir = $PNPM_CACHE_DIR" >> .npmrc

npx -y pnpm@$PNPM_VER install
@dominikg
Copy link
Author

dominikg commented Dec 3, 2021

here's the debug log with from an install with 6.23.5 pnpm install --reporter=ndjson
pnpm-6.23.5.debug.log

@electroma
Copy link

I'm having the same issue on Node 14 and AWS CodeBuild:

Scope: 18 of 167 workspace projects
Lockfile is up-to-date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
.                                        |    +1116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1116, reused 90, downloaded 0, added 0
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /codebuild/output/.pnpm-store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 1116, reused 380, downloaded 2, added 2
Progress: resolved 1116, reused 684, downloaded 2, added 2
Progress: resolved 1116, reused 1106, downloaded 3, added 2
 ENOENT  ENOENT: no such file or directory, open '/codebuild/output/.pnpm-store/v3/tmp/_tmp_175_5be88f66789a81bc54b468486a6d4207/api/api/delete_by_query_rethrottle.js'

@Conduitry
Copy link
Contributor

I'm able to reproduce this with a package.json containing just

{
	"devDependencies": {
		"action-deploy-docs": "github:sveltejs/action-deploy-docs#main"
	}
}

but not with another unrelated personal project that uses different github: dev dependencies. So it's not all packages installed from GitHub, but I don't know what about the action-deploy-docs repo would be causing this.

@zkochan
Copy link
Member

zkochan commented Dec 3, 2021

I am not sure what happened but I changed latest to 6.23.1 for now.

@zkochan
Copy link
Member

zkochan commented Dec 3, 2021

This is a regression caused by #4044

Specifically, because I removed the temp locations of the cloned git repositories even though their linking to the store did not finish. I guess the repositories in the tests are very small, that is why they passed.

@dominikg
Copy link
Author

dominikg commented Dec 4, 2021

thank you for being so on top of things. 💯

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

Successfully merging a pull request may close this issue.

4 participants