关于部署的Netlify问题

关于部署的Netlify问题,netlify,Netlify,我试图编辑这里的内容,但结果是一样的,失败了!有人知道怎么修吗 我试图编辑package.json “生成”:“CI=react脚本生成” 在netlify构建命令中,我尝试了这两种方法 CI=npm运行构建 和 npm运行构建 10:27:27 AM: Waiting for other deploys from your team to complete 10:27:55 AM: Build ready to start 10:27:58 AM: build-image version: b

我试图编辑这里的内容,但结果是一样的,失败了!有人知道怎么修吗

我试图编辑package.json “生成”:“CI=react脚本生成”

在netlify构建命令中,我尝试了这两种方法 CI=npm运行构建 和 npm运行构建

10:27:27 AM: Waiting for other deploys from your team to complete
10:27:55 AM: Build ready to start
10:27:58 AM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
10:27:58 AM: build-image tag: v3.4.1
10:27:58 AM: buildbot version: fcbc7a79f7372e5995cf02954ef19fc48d20c871
10:27:58 AM: Fetching cached dependencies
10:27:58 AM: Failed to fetch cache, continuing with build
10:27:58 AM: Starting to prepare the repo for build
10:27:59 AM: No cached dependencies found. Cloning fresh repo
10:27:59 AM: git clone https://github.com/djdalino/sampleKYC
10:27:59 AM: Preparing Git Reference refs/heads/master
10:28:01 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'client-side/build' versus 'build/' in the Netlify UI
10:28:01 AM: Starting build script
10:28:01 AM: Installing dependencies
10:28:01 AM: Python version set to 2.7
10:28:02 AM: v12.18.0 is already installed.
10:28:03 AM: Now using node v12.18.0 (npm v6.14.4)
10:28:03 AM: Started restoring cached build plugins
10:28:03 AM: Finished restoring cached build plugins
10:28:03 AM: Attempting ruby version 2.7.1, read from environment
10:28:05 AM: Using ruby version 2.7.1
10:28:06 AM: Using PHP version 5.6
10:28:06 AM: 5.2 is already installed.
10:28:06 AM: Using Swift version 5.2
10:28:06 AM: Started restoring cached node modules
10:28:06 AM: Finished restoring cached node modules
10:28:06 AM: Installing NPM modules using NPM version 6.14.4
10:28:42 AM: > core-js@2.6.11 postinstall /opt/build/repo/client-side/node_modules/babel-runtime/node_modules/core-js
10:28:42 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:28:42 AM: > core-js@3.6.5 postinstall /opt/build/repo/client-side/node_modules/core-js
10:28:42 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:28:42 AM: > core-js-pure@3.6.5 postinstall /opt/build/repo/client-side/node_modules/core-js-pure
10:28:42 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:28:44 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
10:28:44 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:28:44 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
10:28:44 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:28:44 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/jest-haste-map/node_modules/fsevents):
10:28:44 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:28:44 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
10:28:44 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:28:44 AM: added 1620 packages from 783 contributors and audited 1627 packages in 37.161s
10:28:46 AM: 66 packages are looking for funding
10:28:46 AM:   run `npm fund` for details
10:28:46 AM: found 0 vulnerabilities
10:28:46 AM: NPM modules installed
10:28:46 AM: Started restoring cached go cache
10:28:46 AM: Finished restoring cached go cache
10:28:46 AM: go version go1.14.4 linux/amd64
10:28:46 AM: go version go1.14.4 linux/amd64
10:28:46 AM: Installing missing commands
10:28:46 AM: Verify run directory
10:28:47 AM: ​
10:28:47 AM: ┌─────────────────────────────┐
10:28:47 AM: │        Netlify Build        │
10:28:47 AM: └─────────────────────────────┘
10:28:47 AM: ​
10:28:47 AM: ❯ Version
10:28:47 AM:   @netlify/build 3.3.0
10:28:47 AM: ​
10:28:47 AM: ❯ Flags
10:28:47 AM:   deployId: 5f45c88e8cca8d000888ec92
10:28:47 AM:   mode: buildbot
10:28:47 AM: ​
10:28:47 AM: ❯ Current directory
10:28:47 AM:   /opt/build/repo/client-side
10:28:47 AM: ​
10:28:47 AM: ❯ Config file
10:28:47 AM:   No config file was defined: using default values.
10:28:47 AM: ​
10:28:47 AM: ❯ Context
10:28:47 AM:   production
10:28:48 AM: ​
10:28:48 AM: ┌───────────────────────────────────┐
10:28:48 AM: │ 1. Build command from Netlify app │
10:28:48 AM: └───────────────────────────────────┘
10:28:48 AM: ​
10:28:48 AM: $ npm run build
10:28:48 AM: > client-side@0.1.0 build /opt/build/repo/client-side
10:28:48 AM: > react-scripts build
10:28:49 AM: Creating an optimized production build...
10:29:00 AM: Failed to compile.
10:29:00 AM: 
10:29:00 AM: ./src/components/Step/StepTwo.jsx
10:29:00 AM:   Line 14:5:  'setCount' is not defined  no-undef
10:29:00 AM: Search for the keywords to learn more about each error.
10:29:00 AM: npm ERR! code ELIFECYCLE
10:29:00 AM: npm ERR! errno 1
10:29:00 AM: npm ERR! client-side@0.1.0 build: `react-scripts build`
10:29:00 AM: npm ERR! Exit status 1
10:29:00 AM: npm ERR!
10:29:00 AM: npm ERR! Failed at the client-side@0.1.0 build script.
10:29:00 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
10:29:00 AM: npm ERR! A complete log of this run can be found in:
10:29:00 AM: npm ERR!     /opt/buildhome/.npm/_logs/2020-08-26T02_29_00_762Z-debug.log
10:29:00 AM:   
10:29:00 AM:   If the build failed with a warning about "process.env.CI = true", this is due to "create-react-app" treating warnings as errors when in CI. In order to fix this problem, please either:
10:29:00 AM:     - Fix the issues highlighted by the warnings above.
10:29:00 AM:     - Or modify the "scripts.build" command in your "package.json" from "react-scripts build" to "CI= react-scripts build"
10:29:00 AM:   More information can be found at https://docs.netlify.com/configure-builds/troubleshooting-tips/#build-fails-on-warning-message
10:29:00 AM: ​
10:29:00 AM: ┌─────────────────────────────┐
10:29:00 AM: │   "build.command" failed    │
10:29:00 AM: └─────────────────────────────┘
10:29:00 AM: ​
10:29:00 AM:   Error message
10:29:00 AM:   Command failed with exit code 1: npm run build
10:29:00 AM: ​
10:29:00 AM:   Error location
10:29:00 AM:   In Build command from Netlify app:
10:29:00 AM:   npm run build
10:29:00 AM: ​
10:29:00 AM:   Resolved config
10:29:00 AM:   build:
10:29:00 AM:     base: /opt/build/repo/client-side
10:29:00 AM:     command: npm run build
10:29:00 AM:     commandOrigin: ui
10:29:00 AM:     publish: /opt/build/repo/client-side/build
10:29:00 AM: Caching artifacts
10:29:00 AM: Started saving node modules
10:29:00 AM: Finished saving node modules
10:29:00 AM: Started saving build plugins
10:29:00 AM: Finished saving build plugins
10:29:00 AM: Started saving pip cache
10:29:01 AM: Finished saving pip cache
10:29:01 AM: Started saving emacs cask dependencies
10:29:01 AM: Finished saving emacs cask dependencies
10:29:01 AM: Started saving maven dependencies
10:29:01 AM: Finished saving maven dependencies
10:29:01 AM: Started saving boot dependencies
10:29:01 AM: Finished saving boot dependencies
10:29:01 AM: Started saving go dependencies
10:29:01 AM: Finished saving go dependencies
10:29:03 AM: Error running command: Build script returned non-zero exit code: 1
10:29:03 AM: Failing build: Failed to build site
10:29:03 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1
10:29:04 AM: Finished processing build request in 1m5.49317571s
我试图编辑这里的内容,但结果是一样的,失败了!有人知道怎么修吗

我试图编辑package.json “生成”:“CI=react脚本生成”

在netlify构建命令中,我尝试了这两种方法 CI=npm运行构建 和
npm运行构建

问题在于您的实际代码,而不是Netlify

10:27:27 AM: Waiting for other deploys from your team to complete
10:27:55 AM: Build ready to start
10:27:58 AM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
10:27:58 AM: build-image tag: v3.4.1
10:27:58 AM: buildbot version: fcbc7a79f7372e5995cf02954ef19fc48d20c871
10:27:58 AM: Fetching cached dependencies
10:27:58 AM: Failed to fetch cache, continuing with build
10:27:58 AM: Starting to prepare the repo for build
10:27:59 AM: No cached dependencies found. Cloning fresh repo
10:27:59 AM: git clone https://github.com/djdalino/sampleKYC
10:27:59 AM: Preparing Git Reference refs/heads/master
10:28:01 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'client-side/build' versus 'build/' in the Netlify UI
10:28:01 AM: Starting build script
10:28:01 AM: Installing dependencies
10:28:01 AM: Python version set to 2.7
10:28:02 AM: v12.18.0 is already installed.
10:28:03 AM: Now using node v12.18.0 (npm v6.14.4)
10:28:03 AM: Started restoring cached build plugins
10:28:03 AM: Finished restoring cached build plugins
10:28:03 AM: Attempting ruby version 2.7.1, read from environment
10:28:05 AM: Using ruby version 2.7.1
10:28:06 AM: Using PHP version 5.6
10:28:06 AM: 5.2 is already installed.
10:28:06 AM: Using Swift version 5.2
10:28:06 AM: Started restoring cached node modules
10:28:06 AM: Finished restoring cached node modules
10:28:06 AM: Installing NPM modules using NPM version 6.14.4
10:28:42 AM: > core-js@2.6.11 postinstall /opt/build/repo/client-side/node_modules/babel-runtime/node_modules/core-js
10:28:42 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:28:42 AM: > core-js@3.6.5 postinstall /opt/build/repo/client-side/node_modules/core-js
10:28:42 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:28:42 AM: > core-js-pure@3.6.5 postinstall /opt/build/repo/client-side/node_modules/core-js-pure
10:28:42 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:28:44 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
10:28:44 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:28:44 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
10:28:44 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:28:44 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/jest-haste-map/node_modules/fsevents):
10:28:44 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:28:44 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
10:28:44 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:28:44 AM: added 1620 packages from 783 contributors and audited 1627 packages in 37.161s
10:28:46 AM: 66 packages are looking for funding
10:28:46 AM:   run `npm fund` for details
10:28:46 AM: found 0 vulnerabilities
10:28:46 AM: NPM modules installed
10:28:46 AM: Started restoring cached go cache
10:28:46 AM: Finished restoring cached go cache
10:28:46 AM: go version go1.14.4 linux/amd64
10:28:46 AM: go version go1.14.4 linux/amd64
10:28:46 AM: Installing missing commands
10:28:46 AM: Verify run directory
10:28:47 AM: ​
10:28:47 AM: ┌─────────────────────────────┐
10:28:47 AM: │        Netlify Build        │
10:28:47 AM: └─────────────────────────────┘
10:28:47 AM: ​
10:28:47 AM: ❯ Version
10:28:47 AM:   @netlify/build 3.3.0
10:28:47 AM: ​
10:28:47 AM: ❯ Flags
10:28:47 AM:   deployId: 5f45c88e8cca8d000888ec92
10:28:47 AM:   mode: buildbot
10:28:47 AM: ​
10:28:47 AM: ❯ Current directory
10:28:47 AM:   /opt/build/repo/client-side
10:28:47 AM: ​
10:28:47 AM: ❯ Config file
10:28:47 AM:   No config file was defined: using default values.
10:28:47 AM: ​
10:28:47 AM: ❯ Context
10:28:47 AM:   production
10:28:48 AM: ​
10:28:48 AM: ┌───────────────────────────────────┐
10:28:48 AM: │ 1. Build command from Netlify app │
10:28:48 AM: └───────────────────────────────────┘
10:28:48 AM: ​
10:28:48 AM: $ npm run build
10:28:48 AM: > client-side@0.1.0 build /opt/build/repo/client-side
10:28:48 AM: > react-scripts build
10:28:49 AM: Creating an optimized production build...
10:29:00 AM: Failed to compile.
10:29:00 AM: 
10:29:00 AM: ./src/components/Step/StepTwo.jsx
10:29:00 AM:   Line 14:5:  'setCount' is not defined  no-undef
10:29:00 AM: Search for the keywords to learn more about each error.
10:29:00 AM: npm ERR! code ELIFECYCLE
10:29:00 AM: npm ERR! errno 1
10:29:00 AM: npm ERR! client-side@0.1.0 build: `react-scripts build`
10:29:00 AM: npm ERR! Exit status 1
10:29:00 AM: npm ERR!
10:29:00 AM: npm ERR! Failed at the client-side@0.1.0 build script.
10:29:00 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
10:29:00 AM: npm ERR! A complete log of this run can be found in:
10:29:00 AM: npm ERR!     /opt/buildhome/.npm/_logs/2020-08-26T02_29_00_762Z-debug.log
10:29:00 AM:   
10:29:00 AM:   If the build failed with a warning about "process.env.CI = true", this is due to "create-react-app" treating warnings as errors when in CI. In order to fix this problem, please either:
10:29:00 AM:     - Fix the issues highlighted by the warnings above.
10:29:00 AM:     - Or modify the "scripts.build" command in your "package.json" from "react-scripts build" to "CI= react-scripts build"
10:29:00 AM:   More information can be found at https://docs.netlify.com/configure-builds/troubleshooting-tips/#build-fails-on-warning-message
10:29:00 AM: ​
10:29:00 AM: ┌─────────────────────────────┐
10:29:00 AM: │   "build.command" failed    │
10:29:00 AM: └─────────────────────────────┘
10:29:00 AM: ​
10:29:00 AM:   Error message
10:29:00 AM:   Command failed with exit code 1: npm run build
10:29:00 AM: ​
10:29:00 AM:   Error location
10:29:00 AM:   In Build command from Netlify app:
10:29:00 AM:   npm run build
10:29:00 AM: ​
10:29:00 AM:   Resolved config
10:29:00 AM:   build:
10:29:00 AM:     base: /opt/build/repo/client-side
10:29:00 AM:     command: npm run build
10:29:00 AM:     commandOrigin: ui
10:29:00 AM:     publish: /opt/build/repo/client-side/build
10:29:00 AM: Caching artifacts
10:29:00 AM: Started saving node modules
10:29:00 AM: Finished saving node modules
10:29:00 AM: Started saving build plugins
10:29:00 AM: Finished saving build plugins
10:29:00 AM: Started saving pip cache
10:29:01 AM: Finished saving pip cache
10:29:01 AM: Started saving emacs cask dependencies
10:29:01 AM: Finished saving emacs cask dependencies
10:29:01 AM: Started saving maven dependencies
10:29:01 AM: Finished saving maven dependencies
10:29:01 AM: Started saving boot dependencies
10:29:01 AM: Finished saving boot dependencies
10:29:01 AM: Started saving go dependencies
10:29:01 AM: Finished saving go dependencies
10:29:03 AM: Error running command: Build script returned non-zero exit code: 1
10:29:03 AM: Failing build: Failed to build site
10:29:03 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1
10:29:04 AM: Finished processing build request in 1m5.49317571s
此处列出了您收到的错误消息:

10:28:48 AM: $ npm run build
10:28:48 AM: > client-side@0.1.0 build /opt/build/repo/client-side
10:28:48 AM: > react-scripts build
10:28:49 AM: Creating an optimized production build...
10:29:00 AM: Failed to compile.
10:29:00 AM: 
10:29:00 AM: ./src/components/Step/StepTwo.jsx
10:29:00 AM:   Line 14:5:  'setCount' is not defined  no-undef
一旦您修复了setCount未定义的问题,它应该可以正常工作