firebase / firebase-tools

The Firebase Command Line Tools
MIT License
3.97k stars 917 forks source link

Error: Command failed: npm i --omit dev --no-audit #7203

Closed JwillSDP closed 1 month ago

JwillSDP commented 1 month ago

[REQUIRED] Environment info

firebase-tools: 13.10.0

Platform: Windows

[REQUIRED] Test case

Failure to deploy hosting using Nextjs App Version 14.2.0

Whenever I try to deploy my app, I get an error in the log file, and it fails. I haven't change much sense my last deployment.

[REQUIRED] Steps to reproduce

$ firebase deploy --only hosting

[REQUIRED] Expected behavior

Deployment of Firebase Hosting using Next js

[REQUIRED] Actual behavior

info] Thank you for trying our early preview of Next.js support on Firebase Hosting. During the preview, support is best-effort and breaking changes can be expected. Proceed with caution. The integration is known to work with Next.js version 12 - 14.0. You may encounter errors.

Documentation: https://firebase.google.com/docs/hosting/frameworks/nextjs File a bug: https://github.com/firebase/firebase-tools/issues/new?template=bug_report.md Submit a feature request: https://github.com/firebase/firebase-tools/issues/new?template=feature_request.md

We'd love to learn from you. Express your interest in helping us shape the future of Firebase Hosting: https://goo.gle/41enW5X

[debug] [2024-05-22T02:21:51.978Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/v12elites/sites/v12elites [none] [debug] [2024-05-22T02:21:52.570Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/v12elites/sites/v12elites 200 [debug] [2024-05-22T02:21:52.571Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/v12elites/sites/v12elites {"name":"projects/v12elites/sites/v12elites","defaultUrl":"https://v12elites.web.app","type":"DEFAULT_SITE"} [info] ▲ Next.js 14.2.0

[info] - Environments: .env.local

[info] Creating an optimized production build ...

[info] ✓ Compiled successfully

[info] Linting and checking validity of types ...

[info] Collecting page data ...

[info] Generating static pages (0/9) ...

[info] Generating static pages (2/9)

[info] Generating static pages (4/9)

[info] Generating static pages (6/9)

[info] ✓ Generating static pages (9/9)

[info] Finalizing page optimization ... Collecting build traces ...

[info]

[info] Route (app) Size First Load JS ┌ ○ / 2.51 kB 227 kB ├ ○ /_not-found 875 B 88 kB ├ ○ /aboutPage 767 B 93 kB ├ ○ /brandsPage 1.63 kB 249 kB ├ ƒ /brandsPage/[id] 2.32 kB 390 kB ├ ○ /eventsPage 2.63 kB 255 kB ├ ƒ /eventsPage/[id] 2.14 kB 389 kB └ ○ /pastEventsPage 2.64 kB 255 kB

[info] ○ (Static) prerendered as static content ƒ (Dynamic) server-rendered on demand

[info] Building a Cloud Function to run this application. This is needed due to: [info] • non-static component /brandsPage/[id]/page [info] • non-static component /eventsPage/[id]/page [info] [debug] [2024-05-22T02:22:24.633Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/v12elites/sites/v12elites [none] [debug] [2024-05-22T02:22:25.216Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/v12elites/sites/v12elites 200 [debug] [2024-05-22T02:22:25.216Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/v12elites/sites/v12elites {"name":"projects/v12elites/sites/v12elites","defaultUrl":"https://v12elites.web.app","type":"DEFAULT_SITE"} [warn] ! This integration expects Node version 16, 18, or 20. You're running version 21, problems may be encountered. [debug] [2024-05-22T02:22:30.188Z] Error: Command failed: npm i --omit dev --no-audit at genericNodeError (node:internal/errors:984:15) at wrappedFn (node:internal/errors:538:14) at checkExecSyncError (node:child_process:890:11) at execSync (node:child_process:962:15) at prepareFrameworks (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\firebase-tools\lib\frameworks\index.js:375:42) at async deploy (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\index.js:57:13) [error] [error] Error: An unexpected error has occurred.

debug-0.log

0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js 1 info using npm@10.5.1 2 info using node@v21.6.1 3 timing npm:load:whichnode Completed in 3ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 2ms 6 timing config:load:builtin Completed in 2ms 7 timing config:load:cli Completed in 3ms 8 timing config:load:env Completed in 1ms 9 timing config:load:file:W:\Coding\v12elite_production.firebase\v12elites\functions.npmrc Completed in 0ms 10 timing config:load:project Completed in 4ms 11 warn config init.version Use --init-version instead. 12 timing config:load:file:C:\Users\Afrosoul4eva.npmrc Completed in 1ms 13 timing config:load:user Completed in 1ms 14 timing config:load:file:C:\Users\Afrosoul4eva\AppData\Roaming\npm\etc\npmrc Completed in 0ms 15 timing config:load:global Completed in 0ms 16 timing config:load:setEnvs Completed in 2ms 17 timing config:load Completed in 15ms 18 timing npm:load:configload Completed in 15ms 19 timing config:load:flatten Completed in 3ms 20 timing npm:load:mkdirpcache Completed in 0ms 21 timing npm:load:mkdirplogs Completed in 0ms 22 verbose title npm i 23 verbose argv "i" "--omit" "dev" "--no-audit" 24 timing npm:load:setTitle Completed in 1ms 25 timing npm:load:display Completed in 3ms 26 verbose logfile logs-max:10 dir:C:\Users\Afrosoul4eva\AppData\Local\npm-cache_logs\2024-05-22T02_07_16_089Z- 27 verbose logfile C:\Users\Afrosoul4eva\AppData\Local\npm-cache_logs\2024-05-22T02_07_16_089Z-debug-0.log 28 timing npm:load:logFile Completed in 12ms 29 timing npm:load:timers Completed in 0ms 30 timing npm:load:configScope Completed in 0ms 31 timing npm:load Completed in 83ms 32 timing arborist:ctor Completed in 1ms 33 silly logfile start cleaning logs, removing 2 files 34 silly logfile done cleaning log files 35 timing idealTree:init Completed in 300ms 36 timing idealTree:userRequests Completed in 0ms 37 silly idealTree buildDeps 38 silly fetch manifest firebase-frameworks@^0.11.0 39 timing arborist:ctor Completed in 0ms 40 http fetch GET 200 https://registry.npmjs.org/firebase-frameworks 69ms (cache hit) 41 silly fetch manifest firebase@^10.11.0 42 http fetch GET 200 https://registry.npmjs.org/firebase 111ms (cache hit) 43 silly fetch manifest firebase-admin@^12.0.0 44 http fetch GET 200 https://registry.npmjs.org/firebase-admin 10ms (cache hit) 45 silly fetch manifest sharp@^0.33.3 46 http fetch GET 200 https://registry.npmjs.org/sharp 9ms (cache hit) 47 silly fetch manifest sharp@^0.32.1 48 silly placeDep ROOT firebase-frameworks@0.11.2 OK for: v12elite_production@0.1.0 want: ^0.11.0 49 silly fetch manifest @hapi/accept@^6.0.1 50 silly fetch manifest cookie@^0.5.0 51 silly fetch manifest lru-cache@^7.14.0 52 http fetch GET 200 https://registry.npmjs.org/cookie 17ms (cache hit) 53 http fetch GET 200 https://registry.npmjs.org/lru-cache 27ms (cache hit) 54 http fetch GET 200 https://registry.npmjs.org/@hapi%2faccept 35ms (cache hit) 55 timing idealTree:#root Completed in 534ms 56 silly placeDep ROOT @hapi/accept@6.0.3 OK for: firebase-frameworks@0.11.2 want: ^6.0.1 57 silly placeDep node_modules/firebase-frameworks cookie@0.5.0 OK for: firebase-frameworks@0.11.2 want: ^0.5.0 58 silly placeDep node_modules/firebase-frameworks lru-cache@7.18.3 OK for: firebase-frameworks@0.11.2 want: ^7.14.0 59 timing idealTree Completed in 845ms 60 timing command:i Completed in 857ms 61 verbose stack Error: could not resolve 61 verbose stack at PlaceDep.failPeerConflict (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:503:25) 61 verbose stack at new PlaceDep (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:157:21) 61 verbose stack at #buildDepStep (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:940:18) 61 verbose stack at async Arborist.buildIdealTree (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:203:7) 61 verbose stack at async Promise.all (index 1) 61 verbose stack at async Arborist.reify (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:154:5) 61 verbose stack at async Install.exec (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:153:5) 61 verbose stack at async module.exports (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\lib\cli-entry.js:61:5) 62 verbose cwd W:\Coding\v12elite_production.firebase\v12elites\functions 63 verbose Windows_NT 10.0.19045 64 verbose node v21.6.1 65 verbose npm v10.5.1 66 error code ERESOLVE 67 error ERESOLVE could not resolve 68 error 69 error While resolving: firebase-frameworks@0.11.2 69 error Found: sharp@0.33.3 69 error node_modules/sharp 69 error sharp@"^0.33.3" from the root project 69 error 69 error Could not resolve dependency: 69 error peerOptional sharp@"^0.32.1" from firebase-frameworks@0.11.2 69 error node_modules/firebase-frameworks 69 error firebase-frameworks@"^0.11.0" from the root project 69 error 69 error Conflicting peer dependency: sharp@0.32.6 69 error node_modules/sharp 69 error peerOptional sharp@"^0.32.1" from firebase-frameworks@0.11.2 69 error node_modules/firebase-frameworks 69 error firebase-frameworks@"^0.11.0" from the root project 69 error 69 error Fix the upstream dependency conflict, or retry 69 error this command with --force or --legacy-peer-deps 69 error to accept an incorrect (and potentially broken) dependency resolution. 70 error 70 error 70 error For a full report see: 70 error C:\Users\Afrosoul4eva\AppData\Local\npm-cache_logs\2024-05-22T02_07_16_089Z-eresolve-report.txt 71 verbose exit 1 72 timing npm Completed in 1626ms 73 verbose unfinished npm timer reify 1716343636843 74 verbose unfinished npm timer reify:loadTrees 1716343636851 75 verbose unfinished npm timer idealTree:buildDeps 1716343637153 76 verbose unfinished npm timer idealTree:node_modules/firebase-frameworks 1716343637689 77 verbose code 1 78 error A complete log of this run can be found in: C:\Users\Afrosoul4eva\AppData\Local\npm-cache_logs\2024-05-22T02_07_16_089Z-debug-0.log

JwillSDP commented 1 month ago

Any progress on this?

JwillSDP commented 1 month ago

I am still getting this error @aalej

LOG File

0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@10.8.0
2 info using node@v21.6.1
3 silly config load:file:C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\npmrc
4 silly config load:file:W:\Coding\v12elite_production\.firebase\v12elites\functions\.npmrc
5 silly config load:file:C:\Users\Afrosoul4eva\.npmrc
6 warn config init.version Use `--init-version` instead.
7 silly config load:file:C:\Users\Afrosoul4eva\AppData\Roaming\npm\etc\npmrc
8 verbose title npm i
9 verbose argv "i" "--omit" "dev" "--no-audit"
10 verbose logfile logs-max:10 dir:C:\Users\Afrosoul4eva\AppData\Local\npm-cache\_logs\2024-05-28T13_31_54_273Z-
11 verbose logfile C:\Users\Afrosoul4eva\AppData\Local\npm-cache\_logs\2024-05-28T13_31_54_273Z-debug-0.log
12 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
13 silly logfile start cleaning logs, removing 2 files
14 silly logfile done cleaning log files
15 silly idealTree buildDeps
16 silly fetch manifest firebase-frameworks@^0.11.0
17 silly packumentCache full:https://registry.npmjs.org/firebase-frameworks cache-miss
18 http fetch GET 200 https://registry.npmjs.org/firebase-frameworks 551ms (cache revalidated)
19 silly packumentCache full:https://registry.npmjs.org/firebase-frameworks set size:1010583 disposed:false
20 silly fetch manifest firebase@^10.11.0
21 silly packumentCache full:https://registry.npmjs.org/firebase cache-miss
22 http fetch GET 200 https://registry.npmjs.org/firebase 906ms (cache updated)
23 silly packumentCache full:https://registry.npmjs.org/firebase set size:undefined disposed:false
24 silly fetch manifest firebase-admin@^12.0.0
25 silly packumentCache full:https://registry.npmjs.org/firebase-admin cache-miss
26 http fetch GET 200 https://registry.npmjs.org/firebase-admin 84ms (cache revalidated)
27 silly packumentCache full:https://registry.npmjs.org/firebase-admin set size:601780 disposed:false
28 silly fetch manifest sharp@^0.33.3
29 silly packumentCache full:https://registry.npmjs.org/sharp cache-miss
30 http fetch GET 200 https://registry.npmjs.org/sharp 50ms (cache revalidated)
31 silly packumentCache full:https://registry.npmjs.org/sharp set size:917593 disposed:false
32 silly fetch manifest sharp@^0.32.1
33 silly packumentCache full:https://registry.npmjs.org/sharp cache-hit
34 silly placeDep ROOT firebase-frameworks@0.11.2 OK for: v12elite_production@0.1.0 want: ^0.11.0
35 silly fetch manifest @hapi/accept@^6.0.1
36 silly packumentCache full:https://registry.npmjs.org/@hapi%2faccept cache-miss
37 silly fetch manifest cookie@^0.5.0
38 silly packumentCache full:https://registry.npmjs.org/cookie cache-miss
39 silly fetch manifest lru-cache@^7.14.0
40 silly packumentCache full:https://registry.npmjs.org/lru-cache cache-miss
41 http fetch GET 200 https://registry.npmjs.org/lru-cache 17ms (cache hit)
42 silly packumentCache full:https://registry.npmjs.org/lru-cache set size:694258 disposed:false
43 http fetch GET 200 https://registry.npmjs.org/cookie 24ms (cache hit)
44 silly packumentCache full:https://registry.npmjs.org/cookie set size:56274 disposed:false
45 http fetch GET 200 https://registry.npmjs.org/@hapi%2faccept 211ms (cache revalidated)
46 silly packumentCache full:https://registry.npmjs.org/@hapi%2faccept set size:38855 disposed:false
47 silly placeDep ROOT @hapi/accept@6.0.3 OK for: firebase-frameworks@0.11.2 want: ^6.0.1
48 silly placeDep node_modules/firebase-frameworks cookie@0.5.0 OK for: firebase-frameworks@0.11.2 want: ^0.5.0
49 silly placeDep node_modules/firebase-frameworks lru-cache@7.18.3 OK for: firebase-frameworks@0.11.2 want: ^7.14.0
50 verbose stack Error: could not resolve
50 verbose stack     at PlaceDep.failPeerConflict (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:503:25)
50 verbose stack     at new PlaceDep (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:157:21)
50 verbose stack     at #buildDepStep (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:917:18)
50 verbose stack     at async Arborist.buildIdealTree (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:181:7)
50 verbose stack     at async Promise.all (index 1)
50 verbose stack     at async Arborist.reify (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:131:5)
50 verbose stack     at async Install.exec (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:150:5)
50 verbose stack     at async Npm.exec (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\lib\npm.js:207:9)
50 verbose stack     at async module.exports (C:\Users\Afrosoul4eva\AppData\Roaming\npm\node_modules\npm\lib\cli\entry.js:74:5)
51 error code ERESOLVE
52 error ERESOLVE could not resolve
53 error
54 error While resolving: firebase-frameworks@0.11.2
54 error Found: sharp@0.33.3
54 error node_modules/sharp
54 error   sharp@"^0.33.3" from the root project
54 error
54 error Could not resolve dependency:
54 error peerOptional sharp@"^0.32.1" from firebase-frameworks@0.11.2
54 error node_modules/firebase-frameworks
54 error   firebase-frameworks@"^0.11.0" from the root project
54 error
54 error Conflicting peer dependency: sharp@0.32.6
54 error node_modules/sharp
54 error   peerOptional sharp@"^0.32.1" from firebase-frameworks@0.11.2
54 error   node_modules/firebase-frameworks
54 error     firebase-frameworks@"^0.11.0" from the root project
54 error
54 error Fix the upstream dependency conflict, or retry
54 error this command with --force or --legacy-peer-deps
54 error to accept an incorrect (and potentially broken) dependency resolution.
55 error
55 error
55 error For a full report see:
55 error C:\Users\Afrosoul4eva\AppData\Local\npm-cache\_logs\2024-05-28T13_31_54_273Z-eresolve-report.txt
56 silly unfinished npm timer reify 1716903115043
57 silly unfinished npm timer reify:loadTrees 1716903115050
58 silly unfinished npm timer idealTree:buildDeps 1716903115298
59 silly unfinished npm timer idealTree:node_modules/firebase-frameworks 1716903117396
60 verbose cwd W:\Coding\v12elite_production\.firebase\v12elites\functions
61 verbose os Windows_NT 10.0.19045
62 verbose node v21.6.1
63 verbose npm  v10.8.0
64 verbose exit 1
65 verbose code 1
66 error A complete log of this run can be found in: C:\Users\Afrosoul4eva\AppData\Local\npm-cache\_logs\2024-05-28T13_31_54_273Z-debug-0.log
JwillSDP commented 1 month ago

SOLVED

I installed npm i sharp@0.32.6


npm i sharp@0.32.6