You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I first thought it is a question, thus I asked it here. But as you can see there this nx upgrade latest does not work for me at all.
I am using pnpm and even if I switch back to npm for a sec to update nx it and switch back to pnpm it does not work.
So to sum it up, we have two issues:
When using pnpm the nx migrate latest does nothing except updating you nx.json and you package.json stays untouched. No migrations.json too.
When I switch to npm for a quick check it does update package.json and nx.json which is not entirely desirable (I mean I want it to work with pnpm and I should not have to switch my package manager to just get it to work) but still it fails to create a migrations.json file.
Though in your doc you're saing "A migrations.json being generated if there are pending migrations.", which I guess meant to say if it was not generated then you do not need it. Thus I guess I am fine on that part.
But the issue is when I try then to run nx serve hello-world. It fails to run it when I switch back to pnpm. Note that it does work if I stay with npm. But I do not wanna.
And then you can see that it does not even bother updating my package.json
rm -rf node_modules tmp dist .nx.
rm pnpm-lock.yaml.
npm i.
nx migrate latest.
npm i.
nx serve hello-world.
You should see some logs in your terminal. It is not doing anything fancy and it is not even a webserver, so it does exit afterward.
rm package-lock.json.
rm -rf node_modules tmp dist .nx
pnpm i.
nx serve hello-world.
It breaks with this log:
NX Daemon process terminated and closed the connection
Please rerun the command, which will restart the daemon.
If you get this error again, check forany errorsin the daemon process logs found in: /home/kasir/projects/graphql/.nx/workspace-data/d/daemon.log
It was really long, so I decided to upload it in pastebin.
BTW nx reset did not help.
Nx Report
It seems as if Nx's cli is entirely crashed. this command also generates the same log:
nx report
NX Daemon process terminated and closed the connection
Please rerun the command, which will restart the daemon.
If you get this error again, check forany errorsin the daemon process logs found in: /home/kasir/projects/graphql/.nx/workspace-data/d/daemon.log
JFYI: I also tried to update my packages to latest since most of the times nx generators does install versions that ain't latest. So I keep them up to date with pnpm. But pnpm update --latest will update everything in my package.json including @nx/* which is not desirable at all. But at the same time when you say skip any lib starting with @nx/* it throws this error.
Now I feel my issue is turning from a simple issue to a chicken and egg problem ♾.
Current Behavior
I first thought it is a question, thus I asked it here. But as you can see there this
nx upgrade latest
does not work for me at all.I am using pnpm and even if I switch back to npm for a sec to update nx it and switch back to pnpm it does not work.
So to sum it up, we have two issues:
When using
pnpm
thenx migrate latest
does nothing except updating younx.json
and youpackage.json
stays untouched. Nomigrations.json
too.When I switch to npm for a quick check it does update
package.json
andnx.json
which is not entirely desirable (I mean I want it to work with pnpm and I should not have to switch my package manager to just get it to work) but still it fails to create amigrations.json
file.Though in your doc you're saing "A migrations.json being generated if there are pending migrations.", which I guess meant to say if it was not generated then you do not need it. Thus I guess I am fine on that part.
But the issue is when I try then to run
nx serve hello-world
. It fails to run it when I switch back to pnpm. Note that it does work if I stay with npm. But I do not wanna.Expected Behavior
Just migrate it.
GitHub Repo
https://github.com/kasir-barati/graphql
Steps to Reproduce
pnpm i
.nx migrate latest
.And then you can see that it does not even bother updating my
package.json
rm -rf node_modules tmp dist .nx
.rm pnpm-lock.yaml
.npm i
.nx migrate latest
.npm i
.nx serve hello-world
.rm package-lock.json
.rm -rf node_modules tmp dist .nx
pnpm i
.nx serve hello-world
.And then here is what is logged in that file:
https://pastebin.com/GAmP4ctH
It was really long, so I decided to upload it in pastebin.
BTW
nx reset
did not help.Nx Report
It seems as if Nx's cli is entirely crashed. this command also generates the same log:
And here is what it logged in that file: https://pastebin.com/fWm2fQ05
Again, too long to be pasted here IMO thus it is pasted in pastebin.
Failure Logs
All logs were provided in previous steps
Package Manager Version
pnpm:9.6.0
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: