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 i get stuck forever on postinstall script #5909

Closed
chungweileong94 opened this issue Jan 10, 2023 · 66 comments
Closed

pnpm i get stuck forever on postinstall script #5909

chungweileong94 opened this issue Jan 10, 2023 · 66 comments
Milestone

Comments

@chungweileong94
Copy link

pnpm version: 7.24.2

Code to reproduce the issue:

pnpm install

Expected behavior:

All packages successfully installed

Actual behavior:

Get stuck in one of the postinstall scripts from a package
image

Additional information:

  • node -v prints: v16.19.0
  • Windows, macOS, or Linux?: macOS
@chungweileong94
Copy link
Author

Not sure if this is related to #5823.
If you remove node_modules, then run pnpm i, it will run perfectly fine. But it will get stuck in subsequence pnpm i

@dragonfire1119
Copy link

dragonfire1119 commented Jan 10, 2023

I fixed it with a strange solution.

  1. Save the pnpm-lock.yaml file or keep it versioned.
  2. Remove the pnpm-lock.yaml and node_modules files. rm -rf node_modules && pnpm install
  3. Run pnpm install generates a new pnpm-lock.yaml file.
  4. Delete new pnpm-lock.yaml.
  5. restore your old pnpm-lock.yaml file.
  6. Rerun rm -rf node_modules && pnpm install, and it should run the postinstall.

This worked for me, and I hope it can help others!

@chuankaiwei
Copy link

same issue. hang up during postinstall.

@shirotech
Copy link
Contributor

Agreed, probably same as #5823

@zkochan
Copy link
Member

zkochan commented Jan 14, 2023

Please create a repo that reproduces the issue.

@nowlena
Copy link

nowlena commented Jan 15, 2023

same issue here, If i remove the "node-linker=hoisted" setting there seems to be no issues

@chungweileong94
Copy link
Author

Please create a repo that reproduces the issue.

Here's a small repo that reproduces the problem
https://github.com/chungweileong94/pnpm-hang-up-bug

Two key things in this repo:

  • node-linker=hoisted
  • A package that contains postinstall

@sleaper
Copy link

sleaper commented Jan 16, 2023

Same issue.

@zkochan
Copy link
Member

zkochan commented Jan 16, 2023

I don't have issues running install on the example repo: https://github.com/chungweileong94/pnpm-hang-up-bug

@edmbn
Copy link

edmbn commented Jan 16, 2023

I don't have issues running install on the example repo: https://github.com/chungweileong94/pnpm-hang-up-bug

I also experience this issue now with prisma. Keep in mind that it's not happening on first install. This starts happening with the second install.

@zkochan
Copy link
Member

zkochan commented Jan 17, 2023

I assume it stopped working in v7.19.0 due to these changes: #5814

@zkochan zkochan pinned this issue Jan 17, 2023
@zkochan
Copy link
Member

zkochan commented Jan 17, 2023

This line could stuck:

await opts.builtHoistedDeps[depNode.depPath].promise

But I cannot think of a scenario when it would happen. I the finally block it is resolved:

opts.builtHoistedDeps[depNode.depPath].resolve()

@zkochan
Copy link
Member

zkochan commented Jan 17, 2023

Looks like this happens a lot but I cannot reproduce it. Please try to debug it yourself and see where and why the issue happens. Also might be useful to find out which exact version of pnpm has introduced the issues (or even which commit).

@chungweileong94
Copy link
Author

Not sure if this info is useful, but the memory keeps building up over time unless I kill the process manually.
image

@chungweileong94
Copy link
Author

chungweileong94 commented Jan 17, 2023

Looks like this happens a lot but I cannot reproduce it. Please try to debug it yourself and see where and why the issue happens. Also might be useful to find out which exact version of pnpm has introduced the issues (or even which commit).

I specifically remember I was facing issue #5823 before, then it was fixed by #5902, however, it started to have this issue.

@zkochan
Copy link
Member

zkochan commented Jan 17, 2023

Try to run with pnpm install --reporter ndjson and attach the output.

@chungweileong94
Copy link
Author

Try to run with pnpm install --reporter ndjson and attach the output.

{"time":1673966063325,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:scope","selected":1}
{"time":1673966063336,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:package-manifest","initial":{"name":"pnpm-hang-up-bug","version":"1.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","dependencies":{"prisma":"^4.8.1"}},"prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug"}
{"time":1673966063338,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:context","currentLockfileExists":true,"storeDir":"/Volumes/MacExtDrive/.pnpm-store/v3","virtualStoreDir":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/.pnpm"}
{"time":1673966063338,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"info","name":"pnpm","message":"Lockfile is up to date, resolution step is skipped","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug"}
{"time":1673966063339,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:stage","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug","stage":"importing_started"}
{"time":1673966063343,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:stats","added":2,"prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug"}
{"time":1673966063343,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:stats","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug","removed":0}
{"time":1673966063347,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:stage","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug","stage":"importing_done"}
{"time":1673966063347,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:package-manifest","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug","updated":{"name":"pnpm-hang-up-bug","version":"1.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","dependencies":{"prisma":"^4.8.1"}}}
{"time":1673966063351,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:lifecycle","depPath":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/@prisma/engines","optional":false,"script":"node scripts/postinstall.js","stage":"postinstall","wd":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/@prisma/engines"}
{"time":1673966063655,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:lifecycle","depPath":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/@prisma/engines","exitCode":0,"optional":false,"stage":"postinstall","wd":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/@prisma/engines"}

@shirotech
Copy link
Contributor

shirotech commented Jan 17, 2023

Try to run with pnpm install --reporter ndjson and attach the output.

{"time":1673966063325,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:scope","selected":1}
{"time":1673966063336,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:package-manifest","initial":{"name":"pnpm-hang-up-bug","version":"1.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","dependencies":{"prisma":"^4.8.1"}},"prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug"}
{"time":1673966063338,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:context","currentLockfileExists":true,"storeDir":"/Volumes/MacExtDrive/.pnpm-store/v3","virtualStoreDir":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/.pnpm"}
{"time":1673966063338,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"info","name":"pnpm","message":"Lockfile is up to date, resolution step is skipped","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug"}
{"time":1673966063339,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:stage","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug","stage":"importing_started"}
{"time":1673966063343,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:stats","added":2,"prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug"}
{"time":1673966063343,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:stats","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug","removed":0}
{"time":1673966063347,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:stage","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug","stage":"importing_done"}
{"time":1673966063347,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:package-manifest","prefix":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug","updated":{"name":"pnpm-hang-up-bug","version":"1.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","dependencies":{"prisma":"^4.8.1"}}}
{"time":1673966063351,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:lifecycle","depPath":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/@prisma/engines","optional":false,"script":"node scripts/postinstall.js","stage":"postinstall","wd":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/@prisma/engines"}
{"time":1673966063655,"hostname":"Chung-Weis-Mac-mini.local","pid":53819,"level":"debug","name":"pnpm:lifecycle","depPath":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/@prisma/engines","exitCode":0,"optional":false,"stage":"postinstall","wd":"/Volumes/MacExtDrive/Projects/pnpm-hang-up-bug/node_modules/@prisma/engines"}

It seems to happen on secondary or external volumes and not on main? Can you confirm? I'm also facing the same issue. Also mac as well.

Maybe it's related to this: oven-sh/bun#362 (comment)

@rodolphoasb
Copy link

Same error here:

image

pnpm v7.25.0 and v7.23.0

@kickbk
Copy link

kickbk commented Jan 17, 2023

+1

@zkochan
Copy link
Member

zkochan commented Jan 17, 2023

It seems to happen on secondary or external volumes and not on main? Can you confirm? I'm also facing the same issue. Also mac as well.

I have tried to reproduce it by running install on a flash drive. It didn't stuck for me. (on macOS as well)

@zkochan
Copy link
Member

zkochan commented Jan 17, 2023

@pnpm/collaborators if anyone can reproduce this, please help me find the issue.

@shirotech
Copy link
Contributor

It seems to happen on secondary or external volumes and not on main? Can you confirm? I'm also facing the same issue. Also mac as well.

I have tried to reproduce it by running install on a flash drive. It didn't stuck for me. (on macOS as well)

Maybe our setup is a bit different, on Mac there is a thing called Volumes, not a physical partition, it's more logical. It will give the same space as the original. Perhaps that could be it.

Screenshot 2023-01-18 at 9 39 56 am

The reason I have done it this way is to enable case sensitive for certain directories, because Mac decides to have file system case insensitive by default, which is bad for git.

@chungweileong94
Copy link
Author

So I tested it on my work machine with only one drive (main drive), and everything seems to work fine.
FYI, I was facing the issue when the codebase is in an external drive.

@zkochan
Copy link
Member

zkochan commented Jan 18, 2023

Then maybe it gets stuck at this point:

await hardLinkDir(depNode.dir, nonBuiltHoistedDeps)

@Murtatrxx
Copy link

Murtatrxx commented Jan 26, 2023

@bchilcott does it say "done" when installing postinstall or just nothing, unlike others

@Murtatrxx
Copy link

Murtatrxx commented Jan 26, 2023

But what is stranger though I was facing this issues in pnpm 7.17, also created an issue (#5706) but no one responded

@bchilcott
Copy link

@bchilcott does it say "done" when installing postinstall or just nothing, unlike others

You're right, mine doesn't say done. I guess mine must be a separate issue related to the one you opened, rather than this one.

@Murtatrxx
Copy link

Then move onto mine

@zkochan
Copy link
Member

zkochan commented Jan 27, 2023

This memory issue: #5909 (comment)

is probably fixed in v7.26.1

@jgoux
Copy link

jgoux commented Jan 27, 2023

This memory issue: #5909 (comment)

is probably fixed in v7.26.1

Hello, I just tested with v7.26.1 and the issue is still there:

➜  snaplet-labs git:(main) ✗ pnpm i
Scope: all 11 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +860
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
node_modules/@prisma/engines: Running postinstall script, done in 147ms
node_modules/prisma/node_modules/@prisma/engines: Running postinstall script, done in 147ms
node_modules/turbo: Running postinstall script, done in 140ms

<--- Last few GCs --->

[3192:0x160040000]  1088169 ms: Mark-sweep 4049.7 (4140.7) -> 4039.0 (4143.2) MB, 1907.2 / 0.0 ms  (average mu = 0.578, current mu = 0.253) task; scavenge might not succeed
[3192:0x160040000]  1091659 ms: Mark-sweep 4052.1 (4143.2) -> 4041.4 (4145.5) MB, 2843.5 / 0.0 ms  (average mu = 0.408, current mu = 0.185) task; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0x102ca0794 node::Abort() [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
 2: 0x102ca0984 node::ModifyCodeGenerationFromStrings(v8::Local<v8::Context>, v8::Local<v8::Value>, bool) [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
 3: 0x102df3790 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
 4: 0x102f9e704 v8::internal::EmbedderStackStateScope::EmbedderStackStateScope(v8::internal::Heap*, v8::internal::EmbedderStackStateScope::Origin, cppgc::EmbedderStackState) [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
 5: 0x102f9d1e8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
 6: 0x10301e3bc v8::internal::ScavengeJob::Task::RunInternal() [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
 7: 0x102cfdc60 node::PerIsolatePlatformData::RunForegroundTask(std::__1::unique_ptr<v8::Task, std::__1::default_delete<v8::Task> >) [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
 8: 0x102cfc8cc node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
 9: 0x1035bcbc8 uv__async_io [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
10: 0x1035cf36c uv__io_poll [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
11: 0x1035bd098 uv_run [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
12: 0x102bf1704 node::SpinEventLoop(node::Environment*) [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
13: 0x102cdcd14 node::NodeMainInstance::Run() [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
14: 0x102c6e614 node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResult const*) [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
15: 0x102c6e898 node::Start(int, char**) [/Users/jgoux/Library/pnpm/nodejs/18.13.0/bin/node]
16: 0x18fc1fe50 start [/usr/lib/dyld]
[1]    3192 abort      pnpm i

@Murtatrxx

This comment was marked as off-topic.

@mgcrea
Copy link

mgcrea commented Jan 31, 2023

@mgcrea could you try with this branch: fix/5909? After the switch run pnpm install.

I did these changes to symlink-dir: pnpm/symlink-dir#39 (files)

@zkochan Can confirm that this branch fixes it while I still got the error using v7.26.1 🎉

zkochan added a commit that referenced this issue Feb 1, 2023
@zkochan
Copy link
Member

zkochan commented Feb 1, 2023

@mgcrea thanks, I have released that fix in v7.26.3

@ngnathan
Copy link

ngnathan commented Feb 1, 2023

Had the same thing with the create-t3-turbo stack. Fix works in 7.26.3. Thanks!

For me, it didn't work in 7.26.2. (And had to downgrade to 7.18.2 as well)

@zkochan
Copy link
Member

zkochan commented Feb 1, 2023

Great, but I am not sure it fixes the initial issue. @chungweileong94 do you still have the issue in v7.26.3?

@kickbk
Copy link

kickbk commented Feb 1, 2023

I tested v7.26.3 and it's working 🎉

@chungweileong94
Copy link
Author

Great, but I am not sure it fixes the initial issue. @chungweileong94 do you still have the issue in v7.26.3?

Yeah, the latest version 7.26.3 seems to fix the issue on my side as well. Appreciate the fix and the other people involved👍

@zkochan zkochan unpinned this issue Feb 2, 2023
@zkochan zkochan added this to the v7.26 milestone Feb 2, 2023
@edgarsilva
Copy link

edgarsilva commented Feb 8, 2023

@zkochan This issue seems to be back in v7.27.0, reverting back to v7.26.3 fixes it.

- pnpm 7.27.0
+ pnpm 7.26.3 (7.27.0 is available)

Here is the output I'm seeing when it fails trying to install a dependency, this is using turborepo and node-linker=hoisted ->

Relinking /home/edgar/workspace/restoration-md/monorepo/node_modules/log-symbols/node_modules/chalk from the store
../../node_modules/es5-ext: Running postinstall script, done in 49ms
../../node_modules/sharp: Running install script, done in 187ms
../../node_modules/supabase: Running postinstall script, done in 2s
../../node_modules/turbo: Running postinstall script, done in 41ms
../..                                    | Progress: resolved 574, reused 583, downloaded 0, added 36, done

<--- Last few GCs --->

[43850:0x4b9e900]    88618 ms: Mark-sweep 4046.9 (4138.5) -> 4036.4 (4141.0) MB, 2267.4 / 0.0 ms  (average mu = 0.094, current mu = 0.022) task scavenge might not succeed
[43850:0x4b9e900]    90941 ms: Mark-sweep 4049.2 (4141.0) -> 4038.8 (4143.5) MB, 2279.7 / 0.0 ms  (average mu = 0.058, current mu = 0.018) task scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb09980 node::Abort() [node]
 2: 0xa1c235 node::FatalError(char const*, char const*) [node]
 3: 0xcf784e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xcf7bc7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xeaf465  [node]
 6: 0xeaff46  [node]
 7: 0xebe46e  [node]
 8: 0xebeeb0 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xf222f4 v8::internal::ScavengeJob::Task::RunInternal() [node]
10: 0xdb59db non-virtual thunk to v8::internal::CancelableTask::Run() [node]
11: 0xb77524 node::PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<v8::Task, std::default_delete<v8::Task> >) [node]
12: 0xb79389 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [node]
13: 0x15633c6  [node]
14: 0x1575af4  [node]
15: 0x1563d18 uv_run [node]
16: 0xa43dd5 node::SpinEventLoop(node::Environment*) [node]
17: 0xb4bab6 node::NodeMainInstance::Run(node::EnvSerializeInfo const*) [node]
18: 0xacd3f2 node::Start(int, char**) [node]
19: 0x7f2c40623510  [/lib/x86_64-linux-gnu/libc.so.6]
20: 0x7f2c406235c9 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
21: 0xa4076c  [node]
fish: Job 1, 'pnpm add @clerk/clerk-react' terminated by signal SIGABRT (Abort)

@zkochan
Copy link
Member

zkochan commented Feb 8, 2023

I am not sure why. I did not touch any of the related code.

@edgarsilva
Copy link

Lol that's weird... I can confirm this happens on Linux and my coworker Mac, same for him reverting to v7.26.3 fixed it.

@chungweileong94
Copy link
Author

It's probably something else, it doesn't seem to happen in my sample repo, tested with v7.27.0

@edgarsilva
Copy link

edgarsilva commented Feb 9, 2023

Only happens in that turborepo, removing all node_modules directories and the lock file and running pnpm i works fine, it's just adding new modules or running package scripts with pnpm run inside any of the apps or packages in the turborepo that breaks it.

My guess is it has has something to do with the .npmrc config, which hasnode-linker=hoisted and strict-peer-dependencies=false.

I don't have more time to debug it till the weekend, I'll see if there's any more info on the root cause I can find and share it here.

@Chitranjan23
Copy link

Chitranjan23 commented Apr 4, 2023

Facing the same issue pnpm@8.1.1

@tylergannon
Copy link

In case it helps: I was getting this issue consistently on newly created sveltekit apps, using
pnpm create svelte@latest my-app and then choosing Skeleton project with Typescript and all additional options.

I could reliably see pnpm i freeze after 15 packages being installed, but if I delete and re-create and install using npm i it would work fine.

I'm on pnpm 8.5.0.

Upgrading from nodejs LTS 18.12.1 to nodejs current (20.1.0) resolved the issue.

@withinoneyear
Copy link

withinoneyear commented Jun 23, 2023

no sure if my one is the same. I'm using pnpm in a monorepo with shamefully-hoist=true, when running pnpm i it starts to resolve and will hang when it resolves 158 packages, and it will stay there for around 30 seconds and then continue. Not sure why is happening when it is stuck

The total time to even add a small package is 42s while for yarn it only takes 13s with the same repo.

I've tried 7.1.1, 7.26.3, 7.33.1 and 8.6.3

@tamvo22
Copy link

tamvo22 commented Apr 26, 2024

I encountered the same frozen issue when upgrading from pnpm@8.15.7 to pnpm@9.0.0 and the latest (9.0.6). 

After the upgrade, I deleted both the node_modules and pnpm-lock.yaml before performing the new pnpm install and getting a consistent freeze.

pnpm install works fine again after I reverted back to pnpm@8.15.7.

I'm using Nx Workspace with shamefully-hoist=true as well. 

pnpm i --reporter ndjson shows frozen always after this entry:
{"time":1714171496637,"hostname":"","pid":,"level":"debug","name":"pnpm:_dependency_resolved","resolution":"@mikro-orm/core@5.9.7","wanted":{"dependentId":".","name":"@mikro-orm/core","rawSpec":"5.9.7"}}

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