2021-04-02T17:04:53.181Z [INFO]: # Starting phase: preBuild # Executing command: cd src/react-frontend 2021-04-02T17:04:53.268Z [INFO]: # Executing command: npm install 2021-04-02T17:04:53.614Z [WARNING]: npm 2021-04-02T17:04:53.616Z [WARNING]: WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it! 2021-04-02T17:05:20.207Z [INFO]: > core-js@2.6.12 postinstall /codebuild/output/src310315486/src/lambda-refarch-imagerecognition/src/react-frontend/node_modules/babel-runtime/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" 2021-04-02T17:05:20.255Z [INFO]: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:  > https://opencollective.com/core-js  > https://www.patreon.com/zloirock  Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) 2021-04-02T17:05:20.289Z [INFO]: > core-js@3.10.0 postinstall /codebuild/output/src310315486/src/lambda-refarch-imagerecognition/src/react-frontend/node_modules/core-js > node -e "try{require('./postinstall')}catch(e){}" 2021-04-02T17:05:20.337Z [INFO]: > core-js-pure@3.10.0 postinstall /codebuild/output/src310315486/src/lambda-refarch-imagerecognition/src/react-frontend/node_modules/core-js-pure > node -e "try{require('./postinstall')}catch(e){}" 2021-04-02T17:05:20.405Z [INFO]: > ejs@2.7.4 postinstall /codebuild/output/src310315486/src/lambda-refarch-imagerecognition/src/react-frontend/node_modules/ejs > node ./postinstall.js 2021-04-02T17:05:20.447Z [INFO]: Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/) 2021-04-02T17:05:22.615Z [WARNING]: npm 2021-04-02T17:05:22.615Z [WARNING]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 2021-04-02T17:05:22.620Z [WARNING]: npm 2021-04-02T17:05:22.621Z [WARNING]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 2021-04-02T17:05:22.630Z [WARNING]: npm 2021-04-02T17:05:22.630Z [WARNING]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 2021-04-02T17:05:22.630Z [WARNING]: 2021-04-02T17:05:22.636Z [INFO]: added 2147 packages from 1170 contributors and audited 2125 packages in 29.062s 2021-04-02T17:05:24.025Z [INFO]: 138 packages are looking for funding run `npm fund` for details 2021-04-02T17:05:24.028Z [INFO]: found 0 vulnerabilities 2021-04-02T17:05:24.062Z [INFO]: # Completed phase: preBuild # Starting phase: build 2021-04-02T17:05:24.062Z [INFO]: # Executing command: npm run build 2021-04-02T17:05:24.230Z [INFO]: > photo-sharing-webapp-react@0.1.1 build /codebuild/output/src310315486/src/lambda-refarch-imagerecognition/src/react-frontend > react-scripts build 2021-04-02T17:05:25.338Z [INFO]: Creating an optimized production build... 2021-04-02T17:05:30.026Z [INFO]: Failed to compile. 2021-04-02T17:05:30.027Z [INFO]: ./node_modules/@aws-amplify/api/lib-esm/API.js Cannot find module: '@aws-amplify/cache'. Make sure this package is installed. You can install this package by running: npm install @aws-amplify/cache. 2021-04-02T17:05:30.042Z [WARNING]: npm 2021-04-02T17:05:30.043Z [WARNING]: ERR! code ELIFECYCLE npm ERR! errno 1 2021-04-02T17:05:30.045Z [WARNING]: npm 2021-04-02T17:05:30.045Z [WARNING]: ERR! photo-sharing-webapp-react@0.1.1 build: `react-scripts build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the photo-sharing-webapp-react@0.1.1 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2021-04-02T17:05:30.051Z [WARNING]: 2021-04-02T17:05:30.051Z [WARNING]: npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-04-02T17_05_30_045Z-debug.log 2021-04-02T17:05:30.051Z [HELP]: Outputting the npm debug log 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/root/.nvm/versions/node/v12.21.0/bin/node', 1 verbose cli '/root/.nvm/versions/node/v12.21.0/bin/npm', 1 verbose cli 'run', 1 verbose cli 'build' 1 verbose cli ] 2 info using npm@6.14.11 3 info using node@v12.21.0 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle photo-sharing-webapp-react@0.1.1~prebuild: photo-sharing-webapp-react@0.1.1 6 info lifecycle photo-sharing-webapp-react@0.1.1~build: photo-sharing-webapp-react@0.1.1 7 verbose lifecycle photo-sharing-webapp-react@0.1.1~build: unsafe-perm in lifecycle true 8 verbose lifecycle photo-sharing-webapp-react@0.1.1~build: PATH: /root/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/codebuild/output/src310315486/src/lambda-refarch-imagerecognition/src/react-frontend/node_modules/.bin:/usr/local/rvm/gems/ruby-2.4.6/bin:/usr/local/rvm/gems/ruby-2.4.6@global/bin:/usr/local/rvm/rubies/ruby-2.4.6/bin:/usr/local/rvm/bin:/root/.yarn/bin:/root/.config/yarn/global/node_modules/.bin:/root/.nvm/versions/node/v12.21.0/bin:/root/.local/bin:/root/.local/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.dotnet/tools 9 verbose lifecycle photo-sharing-webapp-react@0.1.1~build: CWD: /codebuild/output/src310315486/src/lambda-refarch-imagerecognition/src/react-frontend 10 silly lifecycle photo-sharing-webapp-react@0.1.1~build: Args: [ '-c', 'react-scripts build' ] 11 silly lifecycle photo-sharing-webapp-react@0.1.1~build: Returned: code: 1 signal: null 12 info lifecycle photo-sharing-webapp-react@0.1.1~build: Failed to exec build script 13 verbose stack Error: photo-sharing-webapp-react@0.1.1 build: `react-scripts build` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/root/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:314:20) 13 verbose stack at ChildProcess. (/root/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:314:20) 13 verbose stack at maybeClose (internal/child_process.js:1022:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) 14 verbose pkgid photo-sharing-webapp-react@0.1.1 15 verbose cwd /codebuild/output/src310315486/src/lambda-refarch-imagerecognition/src/react-frontend 16 verbose Linux 4.14.219-119.340.amzn1.x86_64 17 verbose argv "/root/.nvm/versions/node/v12.21.0/bin/node" "/root/.nvm/versions/node/v12.21.0/bin/npm" "run" "build" 18 verbose node v12.21.0 19 verbose npm v6.14.11 20 error code ELIFECYCLE 21 error errno 1 22 error photo-sharing-webapp-react@0.1.1 build: `react-scripts build` 22 error Exit status 1 23 error Failed at the photo-sharing-webapp-react@0.1.1 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ] 2021-04-02T17:05:30.054Z [ERROR]: !!! Build failed 2021-04-02T17:05:30.054Z [ERROR]: !!! Non-Zero Exit Code detected 2021-04-02T17:05:30.054Z [INFO]: # Starting environment caching... 2021-04-02T17:05:30.054Z [INFO]: # Uploading environment cache artifact... 2021-04-02T17:05:30.144Z [INFO]: # Environment caching completed