-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Postinstall script hangs when installing with pnpm #28148
Comments
I have the exact same problem on windows. |
Based on comments from previous ticket, i can reproduce the error with this command:
I also get this output:
|
Compared to machines where this works, my instance is getting stuck on this line:
while on other machines this is instantly followed by:
This above line never shows up for me, just keeps waiting forever... |
I found a temporary workaround for me:
|
Thanks, this worked for me too for the installation step! Also running nx now works as long as the project stays in /tmp folder. |
@Cammisuli If you need help to check and try to reproduce this issue, just contact me. (CET) |
I just hit the same issue, but using yarn. Stuck at
|
@keriati any chance you have a global .gitignore? I just did hours of debugging and noticed some debug logs that mentioned my global .gitignore file. After temporarily removing it, everything worked fine. Not sure what the reason is, since I have zero experience with node and was just trying to get an internal application up and running when I hit the issue. @Cammisuli maybe this information is helpful? |
@alex-ruehe it seems when I remove my .gitignore file from my home directory (that I use for versioning my dot files), it starts to work normally again. Maybe this is also somehow connected to the fact that moving the project outside of the home directory makes it also work normally. I would actually say that the .gitignore in the home directory seems to cause this problem. |
We tested it also on another machine, and it really seems that the .gitignore file in the user's home directory is causing this issue. We managed to reproduce this issue by adding a .gitignore file in the home directory. Steps to reproduce:
Workaround:
|
Thank you for the information. I also have this problem and works fine when I remove Other solution was
so, I think the cause is introduced right after 19.4.4. |
This happens also, when installing in a Docker environment, where there is no OS: macOS 15.1.1 These are the postinstall logs from pnpm when executing a
This is the Dockerfile im am running FROM node:22-alpine
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
ENV HUSKY=0
ENV COREPACK_ENABLE_AUTO_PIN=0
RUN corepack enable
WORKDIR /app
COPY . .
RUN pnpm install --filter=@scope/service... --frozen-lockfile
EXPOSE 3000
CMD ["pnpm", "nx", "run", "@scope/service:serve"] EditSince the error message mentions to
So I added the value that was recommended from the error message
The hang stopped and the build went smooth. Service ran as expected. |
I ran into this as well. I had a .gitignore in the directory just above my monorepo. Removing it solved the issue. Edit: I run fedora 39, npm 10.8.2, node 20.18.0 and nx 20.1.2 |
hello, unfortunately I have the same problem, tried anything in the thread, but for some reason my npm/pnpm is stuck at post-install Thanks a lot! |
This also worked for me. Having it outside of the MacOs 15.1.1 |
Another data point: I also had a Also note that my |
Reproducible with |
I did my best to debug the post-install script. I was able to narrow the hang in my reproduction example above to this line:
I got a bit stuck here. I'm not sure what is being called here; there's some Rust code mixed in the "native" module this is imported from, and that's where I find myself a bit out of my depth. |
An somewhat educated guess is that something in nx is "walking" the directory structure and gathering a list of file. Another thread / process is waiting for that list but it never comes... maybe a race condition or bug in the code walking the directory. It's a bit weird and even "wrong" for nx to need to look outside the top level directory of the project. |
I have the same issue in Gitlab CI environment, I saw the doc says it will turned off in CI mode, guess here might be a bug since it still execute demon logic.
|
up |
i tried with nx 19.4.4, i use npm, but issue still reproduces for me, practically i am not able to add nx to my project, which i was trying to start using nx on. |
I can confirm another datapoint for the home |
I work around this by cloning the project outside my home dir, then symlinking to that directory from my |
Current Behavior
Postinstall script hangs when installing with pnpm on MacOS.
Expected Behavior
Postinstall script finishes.
GitHub Repo
Every repository using nx, no specific repository is needed.
Steps to Reproduce
Update 2024-11-17 on how to reproduce:
Nx Report
Failure Logs
Package Manager Version
pnpm 9.3.0
Operating System
Additional Information
os: MacOS 15.0 and MacOS 14
node: v20.17.0
pnpm 9.3.0
nx: 19.8.0
Did try node 22, few pnpm versions, always the same result.
Exact same issue is described in this closed ticket: #27056
The text was updated successfully, but these errors were encountered: