Shi*_*ath 5 deployment firebase npm-install google-cloud-functions
我目前正在使用 Firebase 托管,但突然遇到部署错误。我尝试了所有可能的解决方案,但部署错误多次出现。所以现在需要社区的帮助。请帮我解决这个问题。
\n从这条线上部署过程失败
\ni functions: updating Node.js 16 function firebase-frameworks-softwares-techy:ssrsoftwarestechy(us-central1)...\nBuild failed: npm ERR! code EUSAGE\nnpm ERR! \nnpm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.\nnpm ERR! \nnpm ERR! Invalid: lock file's ajv@8.12.0 does not satisfy ajv@6.12.6\nnpm ERR! Missing: ajv@8.12.0 from lock file\nnpm ERR! Missing: json-schema-traverse@0.4.1 from lock file\nnpm ERR! Missing: ajv@8.12.0 from lock file\nnpm ERR! \nnpm ERR! Clean install a project\nnpm ERR! \nnpm ERR! Usage:\nnpm ERR! npm ci\nnpm ERR! \nnpm ERR! Options:\nnpm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]\nnpm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]\nnpm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]\nnpm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]\nnpm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]\nnpm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]\nnpm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]\nnpm ERR! \nnpm ERR! aliases: clean-install, ic, install-clean, isntall-clean\nnpm ERR! \nnpm ERR! Run "npm help ci" for more info\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /www-data-home/.npm/_logs/2023-03-18T17_41_51_146Z-debug-0.log; Error ID: beaf8772\nBuild failed: ...c-fn@2.1.0 from lock file\nnpm ERR! Missing: error-ex@1.3.2 from lock file\nnpm ERR! Missing: json-parse-even-better-errors@2.3.1 from lock file\nnpm ERR! Missing: lines-and-columns@1.2.4 from lock file\nnpm ERR! Missing: is-arrayish@0.2.1 from lock file\nnpm ERR! Missing: find-up@4.1.0 from lock file\nnpm ERR! Missing: ansi-styles@5.2.0 from lock file\nnpm ERR! Missing: react-is@18.2.0 from lock file\nnpm ERR! Missing: kleur@3.0.3 from lock file\nnpm ERR! Missing: sisteransi@1.0.5 from lock file\nnpm ERR! Missing: is-core-module@2.11.0 from lock file\nnpm ERR! Missing: path-parse@1.0.7 from lock file\nnpm ERR! Missing: supports-preserve-symlinks-flag@1.0.0 from lock file\nnpm ERR! Missing: resolve-from@5.0.0 from lock file\nnpm ERR! Missing: buffer-from@1.1.2 from lock file\nnpm ERR! Missing: escape-string-regexp@2.0.0 from lock file\nnpm ERR! Missing: char-regex@1.0.2 from lock file\nnpm ERR! Missing: glob@7.2.3 from lock file\nnpm ERR! Missing: is-number@7.0.0 from lock file\nnpm ERR! Missing: picocolors@1.0.0 from lock file\nnpm ERR! Missing: convert-source-map@1.9.0 from lock file\nnpm ERR! Missing: makeerror@1.0.12 from lock file\nnpm ERR! Missing: tmpl@1.0.5 from lock file\nnpm ERR! Missing: yallist@3.1.1 from lock file\nnpm ERR! Missing: ansi-styles@3.2.1 from lock file\nnpm ERR! Missing: escape-string-regexp@1.0.5 from lock file\nnpm ERR! Missing: supports-color@5.5.0 from lock file\nnpm ERR! Missing: color-convert@1.9.3 from lock file\nnpm ERR! Missing: color-name@1.1.3 from lock file\nnpm ERR! Missing: has-flag@3.0.0 from lock file\nnpm ERR! Missing: locate-path@5.0.0 from lock file\nnpm ERR! Missing: argparse@1.0.10 from lock file\nnpm ERR! Missing: sprintf-js@1.0.3 from lock file\nnpm ERR! Missing: p-locate@4.1.0 from lock file\nnpm ERR! Missing: p-limit@2.3.0 from lock file\nnpm ERR! Missing: p-try@2.2.0 from lock file\nnpm ERR! Missing: cliui@8.0.1 from lock file\nnpm ERR! Missing: yargs-parser@21.1.1 from lock file\nnpm ERR! Missing: locate-path@5.0.0 from lock file\nnpm ERR! Missing: p-locate@4.1.0 from lock file\nnpm ERR! Missing: p-limit@2.3.0 from lock file\nnpm ERR! \nnpm ERR! Clean install a project\nnpm ERR! \nnpm ERR! Usage:\nnpm ERR! npm ci\nnpm ERR! \nnpm ERR! Options:\nnpm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]\nnpm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]\nnpm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]\nnpm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]\nnpm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]\nnpm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]\nnpm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]\nnpm ERR! \nnpm ERR! aliases: clean-install, ic, install-clean, isntall-clean\nnpm ERR! \nnpm ERR! Run "npm help ci" for more info\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /www-data-home/.npm/_logs/2023-03-18T17_41_49_788Z-debug-0.log; Error ID: beaf8772\n\xe2\x9c\x94 functions[firebase-frameworks-softwares-techy:ssrsoftwarestechy(us-central1)] Successful update operation.\n\nFunctions deploy had errors with the following functions:\n api(us-central1)\n api-app:helloWorld(us-central1)\nFunction URL (firebase-frameworks-softwares-techy:ssrsoftwarestechy(us-central1)): https://ssrsoftwarestechy-llk2uv2hmq-uc.a.run.app\ni functions: cleaning up build files...\nError: There was an error deploying functions:\n- Error Failed to update function api in region us-central1\n- Error Failed to update function helloWorld in region us-central1\nRun Code Online (Sandbox Code Playgroud)\n请帮我解决这个问题。
\n一个可能的问题是您使用了一些标志来生成package.json,或者package-lock.json现在npm ci在 firebase 中未检测到并且存在不匹配。
例如,您可以有
legacy-peer-deps=true
Run Code Online (Sandbox Code Playgroud)
生成文件时在本地计算机的文件中.npmrc,在这种情况下,您需要运行npm ci --legacy-peer-deps部署。
| 归档时间: |
|
| 查看次数: |
1149 次 |
| 最近记录: |