React.js netlify部署失败-无法读取未定义的属性“ toLowerCase”

时间:2019-08-03 08:46:30

标签: deployment netlify building

我的netlify网站运行良好,但是当我对github进行新更改时,netlify抛出了此错误:

(我尝试使用src和公共目录构建新的存储库,然后将存储库推送到新的netlify网站上。“清除缓存并部署也无法完成工作。)

有人知道如何解决此错误吗?

`
10:30:21 AM: Build ready to start
10:30:35 AM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
10:30:35 AM: build-image tag: v3.3.2
10:30:35 AM: buildbot version: ef8d0929ed0baabafd8bbb7d0b021e1fc24180c0
10:30:35 AM: Fetching cached dependencies
10:30:35 AM: Starting to download cache of 152.2MB
10:30:36 AM: Finished downloading cache in 1.021971694s
10:30:36 AM: Starting to extract cache
10:30:42 AM: Finished extracting cache in 6.073782704s
10:30:43 AM: Finished fetching cache in 7.18528173s
10:30:43 AM: Starting to prepare the repo for build
10:30:43 AM: Preparing Git Reference refs/heads/master
10:30:44 AM: Starting build script
10:30:44 AM: Installing dependencies
10:30:44 AM: Started restoring cached node version
10:30:48 AM: Finished restoring cached node version
10:30:49 AM: v10.16.1 is already installed.
10:30:50 AM: Now using node v10.16.1 (npm v6.9.0)
10:30:50 AM: Attempting ruby version 2.6.2, read from environment
10:30:51 AM: Using ruby version 2.6.2
10:30:52 AM: Using PHP version 5.6
10:30:52 AM: Started restoring cached node modules
10:30:52 AM: Finished restoring cached node modules
10:30:52 AM: Installing NPM modules using NPM version 6.9.0
10:31:04 AM: npm
10:31:04 AM:  WARN rm not removing /opt/build/repo/node_modules/.bin/uuid as it wasn't installed by /opt/build/repo/node_modules/node-uuid
10:31:07 AM: npm WARN
10:31:07 AM:  react-object-inspector@0.2.1 requires a peer of react@^0.14.0 but none is installed. You must install peer dependencies yourself.
10:31:07 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/jest-haste-map/node_modules/fsevents):
10:31:07 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:31:07 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/chokidar/node_modules/fsevents):
10:31:07 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:31:07 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.6 (node_modules/fsevents):
10:31:07 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.6: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:31:07 AM: added 4 packages from 3 contributors, removed 82 packages, updated 49 packages and audited 902486 packages in 14.141s
10:31:07 AM: found 0 vulnerabilities
10:31:07 AM: NPM modules installed
10:31:08 AM: Started restoring cached go cache
10:31:08 AM: Finished restoring cached go cache
10:31:08 AM: unset GOOS;
10:31:08 AM: unset GOARCH;
10:31:08 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
10:31:08 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
10:31:08 AM: go version >&2;
10:31:08 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
10:31:08 AM: go version go1.12 linux/amd64
10:31:08 AM: Installing missing commands
10:31:08 AM: Verify run directory
10:31:08 AM: Executing user command: npm run build
10:31:08 AM: > showcase@0.2.0 build /opt/build/repo
10:31:08 AM: > react-scripts build
10:31:10 AM: Creating an optimized production build...
10:31:34 AM: Failed to compile.
10:31:34 AM: Cannot read property 'toLowerCase' of undefined
10:31:34 AM: npm
10:31:34 AM:  ERR! code ELIFECYCLE
10:31:34 AM: npm
10:31:34 AM: ERR! errno 1
10:31:34 AM: npm ERR!
10:31:34 AM:  showcase@0.2.0 build: `react-scripts build`
10:31:34 AM: npm ERR! Exit status 1
10:31:34 AM: npm
10:31:34 AM:  ERR!
10:31:34 AM: npm
10:31:34 AM:  ERR!
10:31:34 AM:  Failed at the showcase@0.2.0 build script.
10:31:34 AM: npm ERR!
10:31:34 AM:  This is probably not a problem with npm. There is likely additional logging output above.
10:31:34 AM: npm ERR! A complete log of this run can be found in:
10:31:34 AM: npm ERR!     /opt/buildhome/.npm/_logs/2019-08-03T08_31_34_728Z-debug.log
10:31:34 AM: Skipping functions preparation step: no functions directory set
10:31:34 AM: Caching artifacts
10:31:34 AM: Started saving node modules
10:31:34 AM: Finished saving node modules
10:31:34 AM: Started saving pip cache
10:31:34 AM: Finished saving pip cache
10:31:35 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
10:31:34 AM: Started saving emacs cask dependencies
10:31:34 AM: Finished saving emacs cask dependencies
10:31:34 AM: Started saving maven dependencies
10:31:34 AM: Finished saving maven dependencies
10:31:34 AM: Started saving boot dependencies
10:31:34 AM: Finished saving boot dependencies
10:31:34 AM: Started saving go dependencies
10:31:34 AM: Finished saving go dependencies
10:31:34 AM: Error running command: Build script returned non-zero exit code: 1
10:31:34 AM: Failing build: Failed to build site
10:31:35 AM: Finished processing build request in 59.500682662s
`

0 个答案:

没有答案