【发布时间】:2021-11-22 18:33:14
【问题描述】:
我正在尝试在我的生产环境中构建(我使用 GitHub 操作进行部署),但错误是我的本地节点之间的节点不一样
在我的本地我有这个版本:
npm -v
-> 7.24.1
node -v
-> v14.13.1
但我不知道 GitHub 操作上的节点版本是什么 我无法在本地重现错误,因为版本不一样
我收到此错误:
success extract queries from components - 4.464s
success write out redirect data - 0.001s
success Build manifest and related icons - 0.003s
error "gatsby-plugin-manifest" threw an error while running the onPostBootstrap lifecycle:
Input file contains unsupported image format
Error:Input file contains unsupported image format
not finished onPostBootstrap - 0.025s
npm ERR! code ELIFECYCLE
这些是我的依赖项:
{
"dependencies": {
"@material-ui/core": "4.11.0",
"@material-ui/icons": "4.9.1",
"@material-ui/lab": "4.0.0-alpha.56",
"@material-ui/styles": "4.11.4",
"axios": "^0.21.0",
"file-saver": "^2.0.5",
"firebase": "^7.15.4",
"gatsby": "^2.22.15",
"gatsby-cli": "^2.12.87",
"gatsby-image": "^2.4.5",
"gatsby-plugin-manifest": "^2.4.9",
"gatsby-plugin-material-ui": "3.0.0",
"gatsby-plugin-react-helmet": "^3.3.2",
"gatsby-plugin-react-redux": "1.1.0",
"gatsby-plugin-react-svg": "^3.0.0",
"gatsby-plugin-robots-txt": "^1.6.8",
"gatsby-plugin-sharp": "^2.6.9",
"gatsby-plugin-sitemap": "3.3.0",
"gatsby-source-filesystem": "^2.3.8",
"gatsby-transformer-sharp": "2.5.3",
"material-ui-dropzone": "3.3.0",
"npm": "^7.5.6",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-redux": "^7.2.1",
"redux": "^4.0.5",
"redux-mock-store": "^1.5.4",
"stopword": "^1.0.3",
"tracking-number-validation": "^2.0.2",
"uuid": "^8.3.2"
},
}
这是部署到生产环境的 build.yml
name: Build
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- run: echo ${{ github.ref }}
- name: Checkout Repo
uses: actions/checkout@v2
【问题讨论】:
标签: node.js reactjs npm github-actions