Gatsby Cloud fails with npm install error: cannot run ssh: No such file or directory

Gatsby Cloud fails with npm install error: cannot run ssh: No such file or directory

我一直在 gatsby 网站上工作,现在想托管它。我一直在尝试在 gatsby 云上部署该站点,但它一直失败并显示错误:

    00:27:41 AM:

Cloning into '/usr/src/app/www'...
00:28:05 AM:

npm ERR!
00:28:05 AM:

 Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git
npm ERR! 
npm ERR! error: cannot run ssh: No such file or directory
npm ERR! fatal: unable to fork
npm ERR! 
npm ERR! exited with error code: 128
00:28:40 AM:

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-05T23_28_05_892Z-debug.log
00:28:40 AM:

NPM ci --unsafe-perm --prefer-offline --no-audit failure - Command failed with exit code 1 (EPERM): npm ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/
00:28:44 AM:

NPM ci --unsafe-perm --prefer-offline --no-audit attempt 1 of 3...
00:28:57 AM:

npm
00:28:57 AM:

 ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git
npm ERR! 
npm ERR! error: cannot run ssh: No such file or directory
npm ERR! fatal: unable to fork
npm ERR! 
npm ERR! exited with error code: 128
00:29:23 AM:

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-05T23_28_57_777Z-debug.log
00:29:23 AM:

NPM ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/ failure - Command failed with exit code 1 (EPERM): npm ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/
00:29:28 AM:

NPM ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/ attempt 2 of 3...
00:30:08 AM:

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-05T23_29_41_049Z-debug.log
00:30:08 AM:

NPM ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/ failure - Command failed with exit code 1 (EPERM): npm ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/
00:30:13 AM:

NPM ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/ attempt 3 of 3...
00:30:26 AM:

npm
00:30:26 AM:

 ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git
npm ERR! 
npm ERR! error: cannot run ssh: No such file or directory
npm ERR! fatal: unable to fork
npm ERR! 
npm ERR! exited with error code: 128
00:30:51 AM:

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-05T23_30_26_996Z-debug.log
00:30:51 AM:

NPM ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/ failure - Command failed with exit code 1 (EPERM): npm ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/
00:30:51 AM:

ERROR Failed to compile: Error: Command failed with exit code 1 (EPERM): npm ci --unsafe-perm --prefer-offline --no-audit --registry=https://registry.npmjs.org/

以下是我的package.json

    {
  "name": "",
  "private": true,
  "description": "A simple starter to get up and developing quickly with Gatsby",
  "version": "0.1.0",
  "author": "",
  "dependencies": {
    "@ethersproject/bignumber": "^5.4.1",
    "@ethersproject/providers": "^5.3.1",
    "@ethersproject/units": "^5.3.0",
    "@fortawesome/fontawesome-free": "^5.15.3",
    "@fortawesome/fontawesome-svg-core": "^1.2.35",
    "@fortawesome/free-brands-svg-icons": "^5.15.3",
    "@fortawesome/free-solid-svg-icons": "^5.15.3",
    "@fortawesome/react-fontawesome": "^0.1.14",
    "@react-icons/all-files": "^4.1.0",
    "@react-spring/web": "^9.2.4",
    "@web3-react/core": "latest",
    "@web3-react/fortmatic-connector": "latest",
    "@web3-react/injected-connector": "latest",
    "@web3-react/walletlink-connector": "latest",
    "bignumber.js": "^9.0.1",
    "bulma": "^0.9.2",
    "crypto-browserify": "^3.12.0",
    "crypto-js": "^4.1.1",
    "dotenv": "^8.6.0",
    "ethers": "^5.4.3",
    "fortmatic": "^2.2.1",
    "gatsby": "^3.6.2",
    "gatsby-background-image": "^1.5.3",
    "gatsby-plugin-fontawesome-css": "^1.1.0",
    "gatsby-plugin-gatsby-cloud": "^2.6.1",
    "gatsby-plugin-image": "^1.6.0",
    "gatsby-plugin-manifest": "^3.6.0",
    "gatsby-plugin-offline": "^4.6.0",
    "gatsby-plugin-react-helmet": "^4.6.0",
    "gatsby-plugin-react-svg": "^3.0.1",
    "gatsby-plugin-sass": "^4.7.1",
    "gatsby-plugin-sharp": "^3.6.0",
    "gatsby-plugin-testing": "^0.3.5",
    "gatsby-source-filesystem": "^3.6.0",
    "gatsby-transformer-sharp": "^3.6.0",
    "gbimage-bridge": "^0.1.4",
    "graphql": "^15.5.2",
    "hamburgers": "^1.1.3",
    "prop-types": "^15.7.2",
    "react": ">=16.8",
    "react-dom": ">=16.8",
    "react-helmet": "^6.1.0",
    "react-pro-sidebar": "^0.6.0",
    "react-switch": "^6.0.0",
    "react-text-transition": "^1.3.0",
    "sass": "^1.35.0",
    "stream": "^0.0.2",
    "swr": "^0.5.6",
    "typescript": "^4.3.5",
    "urql": "^2.0.4",
    "util": "^0.12.4",
    "web-vitals": "^2.0.1",
    "web3": "^1.5.2"
  },
  "devDependencies": {
    "@creativebulma/bulma-tooltip": "^1.2.0",
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^12.0.0",
    "babel-jest": "^26.6.3",
    "babel-preset-gatsby": "^1.10.0",
    "identity-obj-proxy": "^3.0.0",
    "jest": "^26.6.0",
    "prettier": "2.2.1",
    "react-test-renderer": "^17.0.2"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "0BSD",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "clean": "gatsby clean",
    "test": "jest --coverage"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-default"
  },
  "bugs": {
    "url": "https://github.com/gatsbyjs/gatsby/issues"
  },
  "optionalDependencies": {
    "fsevents": "^2.3.2"
  }
}

我也提供了我的 NPM_KEY 作为构建变量,但它不起作用。

任何人都可以提供一些指导吗?

谢谢

据此

npm ERR! /usr/bin/git ls-remote -h -t 

ssh://git@github.com/ethereumjs/ethereumjs-abi.git

很明显您没有存储库的 SSH 访问权限(ethereumjs-abi,顺便说一句,已弃用)。

此外,根据这个GitHub thread,一些其他用户也遇到了同样的 SSH 问题,使用标准 HTTP 请求解决了这个问题,这也意味着这不是 Gatsby Cloud 问题。