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

ERR_PNPM_PREPARE_PKG_FAILURE undefined? #4128

Closed
lyd0 opened this issue Dec 14, 2021 · 12 comments
Closed

ERR_PNPM_PREPARE_PKG_FAILURE undefined? #4128

lyd0 opened this issue Dec 14, 2021 · 12 comments

Comments

@lyd0
Copy link

lyd0 commented Dec 14, 2021

Hey friends, When I use a new computer(windows 11, windows PowerShell) to configure the environment. At this time,  ERR_PNPM_PREPARE_PKG_FAILURE  undefined error occurred, how should I solve it? Thank you very much!

pnpm version:

6.24.0

Code to reproduce the issue:

Execute pnpm install as usual

Actual behavior:

Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: C:\Users\Administrator.pnpm-store\v3
Virtual store is at: ../../node_modules/.pnpm
../.. | +2950 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ERR_PNPM_PREPARE_PKG_FAILURE  undefined
../.. | Progress: resolved 2927, reused 2908, downloaded 0, added 0

Additional information:

image

  • node -v prints:
    node v14.18.2
  • Windows
@lyd0 lyd0 added the type: bug label Dec 14, 2021
@zkochan
Copy link
Member

zkochan commented Dec 14, 2021

Does this happen with pnpm v6.23.1?

@lyd0
Copy link
Author

lyd0 commented Dec 14, 2021

Does this happen with pnpm v6.23.1?

Thank you for your reply, I installed the latest pnpm version 6.24.0 today

@zkochan
Copy link
Member

zkochan commented Dec 14, 2021

I was just wondering if this was introduced by this change #4044

so maybe you can try to downgrade and try with 6.23.1

@lyd0
Copy link
Author

lyd0 commented Dec 14, 2021

I was just wondering if this was introduced by this change #4044

so maybe you can try to downgrade and try with 6.23.1

You are right! Just now I rolled back the version to 6.23.1, 'pnpm install' executed successfully!
Thank you very much!

@lyd0 lyd0 closed this as completed Dec 14, 2021
@lyd0
Copy link
Author

lyd0 commented Dec 14, 2021

I was just wondering if this was introduced by this change #4044

so maybe you can try to downgrade and try with 6.23.1

And I installed version 6.24.0 on another windows computer, and I also get this error, maybe 6.24.0 has compatibility problems on windows systems

@ankon
Copy link

ankon commented Dec 15, 2021

I'm seeing the same error with pnpm 6.23.6 on Linux / NodeJS 14.17, and it seems to work with 6.23.1.

$ pnpm i
Scope: all 102 workspace projects
 WARN  There are cyclic workspace dependencies
Lockfile is up-to-date, resolution step is skipped
Packages: +3180
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/xxx/.pnpm-store/v3
  Virtual store is at:             node_modules/.pnpm
 ERR_PNPM_PREPARE_PKG_FAILURE  undefined
Progress: resolved 3180, reused 301, downloaded 55, added 54
Downloading registry.npmjs.org/typescript/4.4.4: 1.54 MB/11 MB
$ npm install -g pnpm@6.23
/home/xxx/modules/nvs/node/14.17.6/x64/bin/pnpm -> /home/xxx/modules/nvs/node/14.17.6/x64/lib/node_modules/pnpm/bin/pnpm.cjs
/home/xxx/modules/nvs/node/14.17.6/x64/bin/pnpx -> /home/xxx/modules/nvs/node/14.17.6/x64/lib/node_modules/pnpm/bin/pnpx.cjs
+ pnpm@6.23.6
updated 1 package in 0.781s
$ pnpm i
Scope: all 102 workspace projects
 WARN  There are cyclic workspace dependencies
Lockfile is up-to-date, resolution step is skipped
Packages: +3180
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/xxx/.pnpm-store/v3
  Virtual store is at:             node_modules/.pnpm
 ERR_PNPM_PREPARE_PKG_FAILURE  undefined
Progress: resolved 3180, reused 302, downloaded 99, added 96
Downloading registry.npmjs.org/typescript/4.4.4: 1.28 MB/11 MB
$ pnpm -v
6.23.6
$ npm install -g pnpm@6.23.1
/home/xxx/modules/nvs/node/14.17.6/x64/bin/pnpm -> /home/xxx/modules/nvs/node/14.17.6/x64/lib/node_modules/pnpm/bin/pnpm.cjs
/home/xxx/modules/nvs/node/14.17.6/x64/bin/pnpx -> /home/xxx/modules/nvs/node/14.17.6/x64/lib/node_modules/pnpm/bin/pnpx.cjs
+ pnpm@6.23.1
updated 1 package in 0.748s
$ pnpm i
Scope: all 102 workspace projects
 WARN  There are cyclic workspace dependencies
Lockfile is up-to-date, resolution step is skipped
Packages: +3180
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/xxx/.pnpm-store/v3
  Virtual store is at:             node_modules/.pnpm
 WARN  GET https://codeload.github.com/remirror/patch-package/tar.gz/13efcef0a4e1ba5a2db2a41f0385699520ee2d69 error (ENOENT). Will retry in 10 seconds. 2 retries left.
Downloading registry.npmjs.org/typescript/4.4.4: 11 MB/11 MB, done
Downloading registry.npmjs.org/gifwrap/0.9.2: 5.89 MB/5.89 MB, done
Downloading registry.npmjs.org/image-q/1.1.1: 9.32 MB/9.32 MB, done
Downloading registry.npmjs.org/@ffmpeg-installer/linux-x64/4.1.0: 23.1 MB/23.1 MB, done
 WARN  GET https://codeload.github.com/remirror/patch-package/tar.gz/13efcef0a4e1ba5a2db2a41f0385699520ee2d69 error (ENOENT). Will retry in 1 minute. 1 retries left.
Downloading registry.npmjs.org/highcharts/9.3.0: 10.6 MB/10.6 MB, done
Downloading registry.npmjs.org/aws-sdk/2.1017.0: 8.26 MB/8.26 MB, done
 ENOENT  not found: yarn
Progress: resolved 3180, reused 1993, downloaded 1186, added 1195

I executed the pnpm i a few times, and noticed that the amount of bytes downloaded for typescript would be different each time. I also suspect the ENOENT for yarn is unrelated :)

@zkochan
Copy link
Member

zkochan commented Dec 15, 2021

Try 6.24.1. It should print more info.

@ankon
Copy link

ankon commented Dec 30, 2021

I cannot reproduce the problem with 6.24.1 on the same repository anymore.

@brandonmcconnell
Copy link

I was able to reproduce the same ENOENT  not found: yarn issue @ankon experienced when running pnpm v6.32.3.

@ankon
Copy link

ankon commented Mar 10, 2022

I think the ENOENT re yarn is a different problem though than what this issue is about. Do you also see the ERR_PNPM_PREPARE_PKG_FAILURE undefined error?

@jagzmz
Copy link

jagzmz commented Apr 11, 2022

I am having the same issue while running this with github actions.

- uses: pnpm/action-setup@v2.1.0
              with:
                  version: 6.24.4
                  run_install: true

....................................

Progress: resolved 944, reused 0, downloaded 942, added 942
  undefined
   ERR_PNPM_PREPARE_PKG_FAILURE  Command failed with exit code 1: /usr/local/bin/yarn install

any ideas how to resolve this ?

@zkochan
Copy link
Member

zkochan commented Jun 2, 2022

When you install a git-hosted dependency that is managed with Yarn, the yarn CLI is executed to build that dependency. So, you must have yarn installed on the system as well in that case.

@zkochan zkochan closed this as completed Jun 2, 2022
claytoneast added a commit to claytoneast/sequelize that referenced this issue Aug 18, 2022
remove prepare in package.json since yarn will not run scripts
for deps with direct GH sources. we install with pnpm, but:

"When you install a git-hosted dependency that is managed with Yarn, the yarn
CLI is executed to build that dependency. So, you must have yarn installed on
the system as well in that case."
from:
pnpm/pnpm#4128 (comment)
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

5 participants