Nuxt4 upgrade recipe found error
Platform Issues
My project is Nuxt 3 and I want to upgrade to Nuxt 4 and the instruction is recommended with codemode recipe to upgrade it.
Platform: Windows 11 Node: 22.9.0 pnpm: 10.14.0
here's is the command
pnpm dlx codemod@latest nuxt/4/migration-recipe
And here is error message
Error while running the codemod:
Cannot find package 'C:\Users\[username]\scoop\persist\nodejs\cache\_npx\6a5c158be147c5d1\node_modules\@codemod.com\workflow\dist\index.mjs' imported from C:\Users\[username]\scoop\persist\nodejs\cache\_npx\6a5c158be147c5d1\node_modules\codemod\dist\index.cjs
I totally no idea why it happened, because the days before I think I could run it without error and result is as expected.
I have the save problem using MacOS, Node v22.11.0 and npm 11.5.2
I have the save problem using MacOS, Node v22.11.0 and npm 11.5.2
@jacksalici
I found workaround solution, specify [email protected] could do the thing.
But latest version still produce error.
You're right @xenogew ! Using that version worked also for me. TYSM
Seems like 0.18.7 is the latest version to work.
getting the same error
Hi @xenogew. Thanks a lot for reporting this issue!
We recently updated the latest version of Codemod CLI with a new revamped CLI experience. Looks like this caused a regression in these codemods. Could you please use 0.18.7 in the meantime as we investigate the issue and push a fix? I'll keep this thread updated.
Thanks @mohab-sameh, I can confirm yarn dlx [email protected] nuxt/4/migration-recipe works. (adjust for your package manager of choice)