gpt4 book ai didi

javascript - 使用 bit.dev 远程服务器将 Gatsby 部署到 Netlify 失败

转载 作者:行者123 更新时间:2023-12-02 21:49:38 25 4
gpt4 key购买 nike

我正在 Netlify 上构建我的第一个网站。我已经好几周没有更改我的 Gatsby 网站了。当我尝试实时部署时,出现构建错误。

我在部署时遇到以下问题。 gatsby build 和 gatsbydevelopment 都在本地为我工作,所以我很困惑为什么会收到错误。

一切都是最新的,并且可以在本地运行,所以我不知道从这里去哪里。

10:36:03 PM: Build ready to start
10:36:06 PM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
10:36:06 PM: build-image tag: v3.3.5
10:36:06 PM: buildbot version: 2fd8f04962d5dbc77b79b9c2f5ab7a077e87376b
10:36:07 PM: Fetching cached dependencies
10:36:07 PM: Starting to download cache of 144.7MB
10:36:09 PM: Finished downloading cache in 2.582825701s
10:36:09 PM: Starting to extract cache
10:36:15 PM: Finished extracting cache in 6.000055876s
10:36:15 PM: Finished fetching cache in 8.709880759s
10:36:15 PM: Starting to prepare the repo for build
10:36:16 PM: Preparing Git Reference refs/heads/branchone
10:36:16 PM: Starting build script
10:36:16 PM: Installing dependencies
10:36:17 PM: Started restoring cached node version
10:36:19 PM: Finished restoring cached node version
10:36:20 PM: v10.19.0 is already installed.
10:36:21 PM: Now using node v10.19.0 (npm v6.13.4)
10:36:22 PM: Attempting ruby version 2.6.2, read from environment
10:36:24 PM: Using ruby version 2.6.2
10:36:24 PM: Using PHP version 5.6
10:36:24 PM: Started restoring cached node modules
10:36:24 PM: Finished restoring cached node modules
10:36:24 PM: Installing NPM modules using NPM version 6.13.4
10:36:38 PM: npm
10:36:38 PM: WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/log-update-c8270e83/license'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/node-fetch-7939c3a5/CHANGELOG.md'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/log-update-c8270e83/index.js'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/lodash.clonedeep-be5c4aa2/package.json'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/js-base64-e442654a/package.json'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/node-fetch-7939c3a5/LICENSE.md'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/log-update-c8270e83/package.json'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/lodash.clonedeep-be5c4aa2/README.md'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/js-base64-e442654a/1x1.png'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/node-fetch-7939c3a5/README.md'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/log-update-c8270e83/readme.md'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/lodash.clonedeep-be5c4aa2/LICENSE'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/js-base64-e442654a/base64.html'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/log-update-c8270e83/index.d.ts'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/lodash.clonedeep-be5c4aa2/index.js'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/js-base64-e442654a/base64.js'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/node-fetch-7939c3a5/browser.js'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/tar-f1740c72/.nyc_output/37d58de4-deea-4808-bb77-d27685bd1501.json'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-graphiql-explorer-a88a8607/index.js'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/background-attachment.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/tar-f1740c72/.nyc_output/5ad8066b-6b8c-4bc8-b807-c40bf80898b7.json'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-graphiql-explorer-a88a8607/package.json'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/background-clip-text.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/tar-f1740c72/.nyc_output/5cbf674c-7089-4b7d-b9de-2119be4dbb0b.json'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-graphiql-explorer-a88a8607/CHANGELOG.md'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/background-img-opts.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/dist/schema/context.js'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@typescript-eslint/typescript-estree-cb081d4c/dist/create-program/shared.d.ts.map'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-graphiql-explorer-a88a8607/README.md'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/dist/utils/create-node-id.js'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/styled-components-c1c1797b/dist/styled-components.min.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/parser-4551b83e/lib/tokenizer/index.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/background-position-x-y.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/core-c498252d/lib/config/files/types.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@typescript-eslint/typescript-estree-cb081d4c/dist/create-program/shared.js.map'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/preset-env-d3eb7fcc/lib/polyfills/corejs2/entry-plugin.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/background-repeat-round-space.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/core-c498252d/lib/config/util.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/preset-env-d3eb7fcc/lib/polyfills/corejs3/entry-plugin.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/background-sync.js'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/core-c498252d/lib/config/files/utils.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/client/utils/log.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/battery-status.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/lib/utils/normalizeOptions.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@typescript-eslint/typescript-estree-cb081d4c/dist/ts-estree/ts-estree.d.ts.map'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/bin/options.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/cache-dir/commonjs/create-react-context.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@typescript-eslint/experimental-utils-0f843c2d/dist/eslint-utils/applyDefault.d.ts'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/client/overlay.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/cache-dir/create-react-context.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/lib/utils/processOptions.js'
10:36:38 PM: npm
10:36:38 PM: WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/dist/utils/create-schema-customization.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@typescript-eslint/experimental-utils-0f843c2d/dist/eslint-utils/batchedSingleLineTests.d.ts'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/client/utils/reloadApp.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/lib/utils/routes.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/preset-env-d3eb7fcc/lib/polyfills/corejs2/get-platform-specific-default.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/ink-d906e9af/build/experimental/dom.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/beacon.js'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/lib/utils/runBonjour.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/beforeafterprint.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/lib/utils/runOpen.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@typescript-eslint/experimental-utils-0f843c2d/dist/eslint-utils/deepMerge.d.ts'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/webpack-dev-server-ad2d41fe/client/utils/sendMessage.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/dist/schema/types/date.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@typescript-eslint/experimental-utils-0f843c2d/dist/eslint-utils/getParserServices.d.ts'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@typescript-eslint/experimental-utils-0f843c2d/dist/eslint-utils/index.d.ts'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/node-releases-ab6f917e/.idea/encodings.xml'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/cache-dir/commonjs/default-html.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/node-releases-ab6f917e/.idea/misc.xml'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/cache-dir/default-html.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/ink-d906e9af/build/experimental/output.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/bigint.js'
10:36:38 PM: npm
10:36:38 PM: WARN
10:36:38 PM: tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/node-releases-ab6f917e/.idea/modules.xml'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/dist/schema/types/derived-types.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/loglevel-b5b4bfec/lib/loglevel.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, lstat '/opt/build/repo/node_modules/.staging/node-releases-ab6f917e/.idea/inspectionProfiles'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/dist/utils/detect-port-in-use-and-prompt.js'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/gatsby-6b1ce8d7/cache-dir/__tests__/dev-loader.js'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/ink-d906e9af/build/experimental/reconciler.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/node-releases-ab6f917e/.idea/vcs.xml'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/preset-env-d3eb7fcc/lib/polyfills/corejs3/shipped-proposals.js'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/blobbuilder.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/node-releases-ab6f917e/.idea/workspace.xml'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/bloburls.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/preset-env-d3eb7fcc/lib/polyfills/corejs2/usage-plugin.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@babel/preset-env-d3eb7fcc/lib/polyfills/corejs3/usage-plugin.js'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/ink-d906e9af/build/experimental/renderer.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/@typescript-eslint/experimental-utils-0f843c2d/dist/ts-eslint/Rule.d.ts'
10:36:38 PM: npm
10:36:38 PM: WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/border-image.js'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/border-radius.js'
10:36:38 PM: npm WARN
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/eslint-plugin-react-2ba72860/lib/util/jsx.js'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/broadcastchannel.js'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/eslint-plugin-react-2ba72860/lib/util/linkComponents.js'
10:36:38 PM: npm WARN tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/caniuse-lite-12aab0cf/data/features/brotli.js'
10:36:38 PM: npm WARN
10:36:40 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/eslint-plugin-react-2ba72860/lib/util/log.js'
10:36:38 PM: npm WARN tar
10:36:38 PM: ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/fsevents-b86bc582/node_modules/nopt/LICENSE'
10:36:38 PM: npm WARN
10:36:40 PM: Shutting down logging, 492 messages pending
10:36:38 PM: tar ENOENT: no such file or directory, open '/opt/build/repo/node_modules/.staging/eslint-plugin-react-2ba72860/lib/util/makeNoMethodSetStateRule.js'
10:36:38 PM: npm WARN

最佳答案

这里的罪魁祸首是为您的依赖项之一使用了 bit.dev 组件注册表服务器。

    "@bit/bondz.react-epic-spinners.atom-spinner": "^0.3.0",

Here is the doc section开始在 Netlify 上进行以下设置:

On Netlify, you cannot generate the file dynamically, and you should add .npmrc file in your project.

将.npmrc添加到项目

您可以使用以下内容在项目中添加 .npmrc:

/.npmrc

@bit:registry=https://node.bit.dev
//node.bit.dev/:_authToken=${BIT_TOKEN}
always-auth=true

Add the BIT_TOKEN as environment variable

请勿:BIT_TOKEN 变量替换为 .npmrc 文件中的实际 token ,因为它是公共(public)的。仅将 token 放入 Netlify 的管理面板中,如链接文档中所述。

关于javascript - 使用 bit.dev 远程服务器将 Gatsby 部署到 Netlify 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60159604/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com