Zeit现在部署sh:build:找不到命令

当我尝试将React app(typescript)部署到zeit时出现此错误。我正在运行MacOS Mojave,节点v12.12.0,npm 6.14.2(但我在项目中使用yarn,yarn 1.17.3)。它来自模板,我先运行yarn,然后运行now。现在的控制台为我提供了此日志错误的链接。不知道它指的是什么。

sh: build: command not found
Error: Exited with 127
at ChildProcess.<anonymous> (/zeit/ab5350c9de262234/.build-utils/.builder/node_modules/@now/static-build/dist/index.js:33891:24)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeclose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
worker exited with code 20 and signal null
Done with "package.json"

package.json文件:

{
 "name": "@pickbazar/admin","version": "1.0.0","private": true,"dependencies": {
   "@apollo/react-hooks": "^3.1.3","apexcharts": "3.8.6","apollo-boost": "^0.4.4","baseui": "^9.40.0","formik": "^2.1.4","fuse.js": "^3.4.6","graphql": "^14.6.0","mobile-detect": "^1.4.4","moment": "^2.24.0","react": "^16.12.0","react-apexcharts": "^1.3.3","react-content-loader": "^5.0.1","react-custom-scrollbars": "^4.2.1","react-dom": "^16.12.0","react-dropzone": "^10.2.1","react-flexbox-grid": "^2.1.2","react-hook-form": "4.9.3","react-image": "^2.4.0","react-moment": "^0.9.6","react-reveal": "^1.2.2","react-router-dom": "^5.1.2","react-scripts": "^3.4.0","styled-components": "^5.0.1","styletron-engine-atomic": "^1.4.5","styletron-react": "^5.2.7","typescript": "^3.7.5","yup": "^0.28.1"
 },"scripts": {
"start": "react-scripts start","admin-dev": "react-scripts start","build": "react-scripts build","eject": "react-scripts eject","serve": "serve -s build"
 },"eslintConfig": {
   "extends": "react-app"
 },"browserslist": [
   ">0.2%","not dead","not ie <= 11","not op_mini all"
 ],"devDependencies": {
   "@types/node": "^13.7.1","@types/react": "^16.9.19","@types/react-dom": "^16.9.5","@types/react-router-dom": "^5.1.2","@types/yup": "^0.26.31"
 }
  }
zhouanneng 回答:Zeit现在部署sh:build:找不到命令

尝试bash buildnpm run build

如果仅在项目的设置中输入build,则会发生该错误。

本文链接:https://www.f2er.com/2644889.html

大家都在问