Open kasir-barati opened 2 days ago
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:
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
Package Manager Version
pnpm:9.6.0
Operating System
Additional Information
No response