framework
framework copied to clipboard
Migration from "rc.6" to "rc.11" not working
Environment
- Operating System:
Darwin
- Node Version:
v16.17.0
- Nuxt Version:
3.0.0-rc.11
- Nitro Version:
-
- Package Manager:
unknown
- Builder:
vite
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Reproduction
-
Starting a Nuxt project with rc6
-
Using following
package.json
{
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview"
},
"devDependencies": {
"@nuxtjs/tailwindcss": "^5.3.1",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/line-clamp": "^0.4.0",
"@tailwindcss/typography": "^0.5.4",
"@vueuse/core": "^9.1.0",
"@vueuse/nuxt": "^9.1.0",
"nuxt": "3.0.0-rc.6"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.1.2",
"@fortawesome/free-brands-svg-icons": "^6.1.2",
"@fortawesome/free-regular-svg-icons": "^6.1.2",
"@fortawesome/free-solid-svg-icons": "^6.1.2",
"@fortawesome/vue-fontawesome": "^3.0.1",
"@headlessui/vue": "^1.6.7",
"@heroicons/vue": "^1.0.6",
"@pinia/nuxt": "^0.3.1",
"@vee-validate/rules": "^4.6.6",
"pinia": "^2.0.17",
"vee-validate": "^4.6.6",
"yup": "^0.32.11"
}
}
-
Change
"nuxt": "3.0.0-rc.6"
for"nuxt": "3.0.0-rc.11"
-
Run
npx nuxi@latest cleanup
-
Run
npm install
Describe the bug
Working on a project using 3.0.0-rc.6, I wanted to upgrade my project to rc11 following the manual bump: https://github.com/nuxt/framework/discussions/7691
- I manually changed
3.0.0-rc.6
to3.0.0-rc.11
frompackage.json
- Ran the command
npx nuxi@latest cleanup
and approved the prompt:
$ npx nuxi@latest cleanup
Need to install the following packages:
[email protected]
Ok to proceed? (y)
- Ran
npm install
and got this error:
npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR! peer vue@">= 3.0.0 < 4" from @fortawesome/[email protected]
npm ERR! node_modules/@fortawesome/vue-fontawesome
npm ERR! @fortawesome/vue-fontawesome@"^3.0.1" from the root project
npm ERR! peer vue@"^3.2.0" from @headlessui/[email protected]
npm ERR! node_modules/@headlessui/vue
npm ERR! @headlessui/vue@"^1.6.7" from the root project
npm ERR! 2 more (@heroicons/vue, nuxt)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! pinia@"^2.0.17" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vue
npm ERR! peer vue@">= 2.5 < 2.7" from @vue/[email protected]
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@"^1.4.0" from [email protected]
npm ERR! node_modules/pinia
npm ERR! pinia@"^2.0.17" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/david/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/david/.npm/_logs/2022-09-22T14_38_40_105Z-debug-0.log
Does someone have an idea of how to fix it?
Another point: reverting to my original package.json
and running npm install
is not working anymore, so, I just cannot go back to my project before this rc11 move :cry:
Thanks a lot!
Additional context
The project architecture sits under a mono repo.
Another detail:
npx nuxi info
does not return my package manager either.
...
- Package Manager: `unknown`
...
I installed Node from https://nodejs.org/en/download/
macOS Installer.
Logs
0 verbose cli /usr/local/bin/node /usr/local/bin/npm
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 0ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/Users/david/Code/project/project-app-nuxt/.npmrc Completed in 1ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:/Users/david/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 7ms
19 timing npm:load:configload Completed in 7ms
20 timing npm:load:mkdirpcache Completed in 2ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm install
23 verbose argv "install"
24 timing npm:load:setTitle Completed in 15ms
25 timing config:load:flatten Completed in 2ms
26 timing npm:load:display Completed in 3ms
27 verbose logfile logs-max:10 dir:/Users/david/.npm/_logs
28 verbose logfile /Users/david/.npm/_logs/2022-09-22T14_38_40_105Z-debug-0.log
29 timing npm:load:logFile Completed in 4ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 32ms
33 timing arborist:ctor Completed in 1ms
34 silly logfile start cleaning logs, removing 1 files
35 silly logfile done cleaning log files
36 timing arborist:ctor Completed in 0ms
37 timing idealTree:init Completed in 11ms
38 timing idealTree:userRequests Completed in 0ms
39 silly idealTree buildDeps
40 silly fetch manifest @fortawesome/fontawesome-svg-core@^6.1.2
41 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffontawesome-svg-core 109ms (cache miss)
42 silly fetch manifest @fortawesome/free-brands-svg-icons@^6.1.2
43 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffree-brands-svg-icons 366ms (cache miss)
44 silly fetch manifest @fortawesome/free-regular-svg-icons@^6.1.2
45 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffree-regular-svg-icons 1264ms (cache miss)
46 silly fetch manifest @fortawesome/free-solid-svg-icons@^6.1.2
47 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffree-solid-svg-icons 330ms (cache miss)
48 silly fetch manifest @fortawesome/vue-fontawesome@^3.0.1
49 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2fvue-fontawesome 356ms (cache miss)
50 silly fetch manifest vue@>= 3.0.0 < 4
51 http fetch GET 200 https://registry.npmjs.org/vue 33ms (cache miss)
52 silly fetch manifest @headlessui/vue@^1.6.7
53 http fetch GET 200 https://registry.npmjs.org/@headlessui%2fvue 1710ms (cache miss)
54 silly fetch manifest vue@^3.2.0
55 silly fetch manifest @heroicons/vue@^1.0.6
56 http fetch GET 200 https://registry.npmjs.org/@heroicons%2fvue 1708ms (cache miss)
57 silly fetch manifest vue@>= 3
58 silly fetch manifest @pinia/nuxt@^0.3.1
59 http fetch GET 200 https://registry.npmjs.org/@pinia%2fnuxt 723ms (cache miss)
60 silly fetch manifest @vee-validate/rules@^4.6.6
61 http fetch GET 200 https://registry.npmjs.org/@vee-validate%2frules 1692ms (cache miss)
62 silly fetch manifest pinia@^2.0.17
63 http fetch GET 200 https://registry.npmjs.org/pinia 714ms (cache miss)
64 silly fetch manifest @vue/composition-api@^1.4.0
65 http fetch GET 200 https://registry.npmjs.org/@vue%2fcomposition-api 1186ms (cache miss)
66 silly fetch manifest vue@>= 2.5 < 2.7
67 silly fetch manifest typescript@>=4.4.4
68 http fetch GET 200 https://registry.npmjs.org/typescript 96ms (cache miss)
69 silly fetch manifest vee-validate@^4.6.6
70 http fetch GET 200 https://registry.npmjs.org/vee-validate 726ms (cache miss)
71 silly fetch manifest vue@^3.0.0
72 silly fetch manifest yup@^0.32.11
73 http fetch GET 200 https://registry.npmjs.org/yup 35ms (cache miss)
74 silly fetch manifest @nuxtjs/tailwindcss@^5.3.1
75 http fetch GET 200 https://registry.npmjs.org/@nuxtjs%2ftailwindcss 765ms (cache miss)
76 silly fetch manifest @tailwindcss/aspect-ratio@^0.4.0
77 http fetch GET 200 https://registry.npmjs.org/@tailwindcss%2faspect-ratio 720ms (cache miss)
78 silly fetch manifest tailwindcss@>=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1
79 http fetch GET 200 https://registry.npmjs.org/tailwindcss 256ms (cache miss)
80 silly fetch manifest @tailwindcss/forms@^0.5.2
81 http fetch GET 200 https://registry.npmjs.org/@tailwindcss%2fforms 1234ms (cache miss)
82 silly fetch manifest tailwindcss@>=3.0.0 || >= 3.0.0-alpha.1
83 silly fetch manifest @tailwindcss/line-clamp@^0.4.0
84 http fetch GET 200 https://registry.npmjs.org/@tailwindcss%2fline-clamp 1683ms (cache miss)
85 silly fetch manifest @tailwindcss/typography@^0.5.4
86 http fetch GET 200 https://registry.npmjs.org/@tailwindcss%2ftypography 341ms (cache miss)
87 silly fetch manifest tailwindcss@>=3.0.0 || insiders
88 silly fetch manifest @vueuse/core@^9.1.0
89 http fetch GET 200 https://registry.npmjs.org/@vueuse%2fcore 1271ms (cache miss)
90 silly fetch manifest @vueuse/nuxt@^9.1.0
91 http fetch GET 200 https://registry.npmjs.org/@vueuse%2fnuxt 697ms (cache miss)
92 silly fetch manifest [email protected]
93 http fetch GET 200 https://registry.npmjs.org/nuxt 245ms (cache miss)
94 silly placeDep ROOT @fortawesome/[email protected] OK for: want: ^6.1.2
95 silly placeDep ROOT @fortawesome/[email protected] OK for: want: ^6.1.2
96 silly placeDep ROOT @fortawesome/[email protected] OK for: want: ^6.1.2
97 silly placeDep ROOT @fortawesome/[email protected] OK for: want: ^6.1.2
98 silly placeDep ROOT @fortawesome/[email protected] OK for: want: ^3.0.1
99 silly placeDep ROOT [email protected] OK for: @fortawesome/[email protected] want: >= 3.0.0 < 4
100 silly placeDep ROOT @headlessui/[email protected] OK for: want: ^1.6.7
101 silly placeDep ROOT @heroicons/[email protected] OK for: want: ^1.0.6
102 silly placeDep ROOT @nuxtjs/[email protected] OK for: want: ^5.3.1
103 silly placeDep ROOT @pinia/[email protected] OK for: want: ^0.3.1
104 silly placeDep ROOT @tailwindcss/[email protected] OK for: want: ^0.4.0
105 silly placeDep ROOT [email protected] OK for: @tailwindcss/[email protected] want: >=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1
106 silly placeDep ROOT @tailwindcss/[email protected] OK for: want: ^0.5.2
107 silly placeDep ROOT @tailwindcss/[email protected] OK for: want: ^0.4.0
108 silly placeDep ROOT @tailwindcss/[email protected] OK for: want: ^0.5.4
109 silly placeDep ROOT @vee-validate/[email protected] OK for: want: ^4.6.6
110 silly placeDep ROOT @vueuse/[email protected] OK for: want: ^9.1.0
111 silly placeDep ROOT @vueuse/[email protected] OK for: want: ^9.1.0
112 silly placeDep ROOT [email protected] OK for: @vueuse/[email protected] want: ^3.0.0-rc.9
113 timing idealTree Completed in 18431ms
114 timing command:install Completed in 18443ms
115 verbose stack Error: could not resolve
115 verbose stack at PlaceDep.failPeerConflict (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:549:25)
115 verbose stack at PlaceDep.place (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:199:21)
115 verbose stack at new PlaceDep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:73:10)
115 verbose stack at /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:990:31
115 verbose stack at Array.map (<anonymous>)
115 verbose stack at Arborist.[buildDepStep] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:990:8)
115 verbose stack at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:218:7)
115 verbose stack at async Promise.all (index 1)
115 verbose stack at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:154:5)
115 verbose stack at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:145:5)
116 verbose cwd /Users/david/Code/project/project-app-nuxt
117 verbose Darwin 21.6.0
118 verbose node v16.17.0
119 verbose npm v8.15.0
120 error code ERESOLVE
121 error ERESOLVE could not resolve
122 error
123 error While resolving: [1mundefined[22m@[1mundefined[22m
123 error Found: [1mvue[22m@[1m3.2.39[22m[2m[22m
123 error [2mnode_modules/vue[22m
123 error [35mpeer[39m [1mvue[22m@"[1m>= 3.0.0 < 4[22m" from [1m@fortawesome/vue-fontawesome[22m@[1m3.0.1[22m[2m[22m
123 error [2mnode_modules/@fortawesome/vue-fontawesome[22m
123 error [1m@fortawesome/vue-fontawesome[22m@"[1m^3.0.1[22m" from the root project
123 error [35mpeer[39m [1mvue[22m@"[1m^3.2.0[22m" from [1m@headlessui/vue[22m@[1m1.7.2[22m[2m[22m
123 error [2mnode_modules/@headlessui/vue[22m
123 error [1m@headlessui/vue[22m@"[1m^1.6.7[22m" from the root project
123 error 2 more (@heroicons/vue, nuxt)
123 error
123 error Could not resolve dependency:
123 error [1mpinia[22m@"[1m^2.0.17[22m" from the root project
123 error
123 error Conflicting peer dependency: [1mvue[22m@[1m2.6.14[22m[2m[22m
123 error [2mnode_modules/vue[22m
123 error [35mpeer[39m [1mvue[22m@"[1m>= 2.5 < 2.7[22m" from [1m@vue/composition-api[22m@[1m1.7.0[22m[2m[22m
123 error [2mnode_modules/@vue/composition-api[22m
123 error peerOptional [1m@vue/composition-api[22m@"[1m^1.4.0[22m" from [1mpinia[22m@[1m2.0.22[22m[2m[22m
123 error [2mnode_modules/pinia[22m
123 error [1mpinia[22m@"[1m^2.0.17[22m" from the root project
123 error
123 error Fix the upstream dependency conflict, or retry
123 error this command with --force, or --legacy-peer-deps
123 error to accept an incorrect (and potentially broken) dependency resolution.
123 error
123 error See /Users/david/.npm/eresolve-report.txt for a full report.
124 verbose exit 1
125 timing npm Completed in 18533ms
126 verbose unfinished npm timer reify 1663857520188
127 verbose unfinished npm timer reify:loadTrees 1663857520196
128 verbose unfinished npm timer idealTree:buildDeps 1663857520208
129 verbose unfinished npm timer idealTree:#root 1663857520208
130 verbose code 1
131 error A complete log of this run can be found in:
131 error /Users/david/.npm/_logs/2022-09-22T14_38_40_105Z-debug-0.log
Can you try this? npm i --force
Also try removing package-lock.json
and node_modules
, then try npm install
https://stackoverflow.com/a/68430109
Hi, did you try this?
Automated: npx nuxi@latest upgrade --force
@sevillaarvin Thank you, I tried with --force and it worked, I wasn't sure if using this option was the right thing to do, since I wanted to understand what went wrong exactly.
Do you have an idea of the original issue?
@nicojuhari Yes, I tried, but it just deleted my node modules and package.json. Then ran into an issue: couldn't find my package manager... :(
Thanks both of you!
@sevillaarvin Thank you, I tried with --force and it worked, I wasn't sure if using this option was the right thing to do, since I wanted to understand what went wrong exactly.
Do you have an idea of the original issue?
@nicojuhari Yes, I tried, but it just deleted my node modules and package.json. Then ran into an issue: couldn't find my package manager... :(
Thanks both of you!
I wish I knew, I’m not yet familiar with how npm works internally. For what it’s worth, I think it’s better to update a package via cli than editing the package.json
manually.
Here is what I do, I check if there are outdated packages via npm outdated
, then I update the specific packages that I want via npm update $PACKAGE_HERE
.
Thank you guys! @sevillaarvin @nicojuhari