Skip to content

Instantly share code, notes, and snippets.

@blairanderson
Last active August 16, 2022 16:10
Show Gist options
  • Save blairanderson/89bfaf7ea89ccfdd0fbd716f8eed849d to your computer and use it in GitHub Desktop.
Save blairanderson/89bfaf7ea89ccfdd0fbd716f8eed849d to your computer and use it in GitHub Desktop.
Create React App netlify npm ERR! code ERESOLVE
8:33:29 AM: Build ready to start
8:33:31 AM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
8:33:31 AM: build-image tag: v4.10.1
8:33:31 AM: buildbot version: aa4e1c51618610360476c8cb99b22ac3191f186e
8:33:31 AM: Fetching cached dependencies
8:33:31 AM: Failed to fetch cache, continuing with build
8:33:31 AM: Starting to prepare the repo for build
8:33:31 AM: No cached dependencies found. Cloning fresh repo
8:33:31 AM: git clone https://github.com/blairanderson/kw-perm-builder
8:33:31 AM: Preparing Git Reference refs/heads/main
8:33:31 AM: Parsing package.json dependencies
8:33:32 AM: Starting build script
8:33:32 AM: Installing dependencies
8:33:32 AM: Python version set to 2.7
8:33:33 AM: Downloading and installing node v16.17.0...
8:33:33 AM: Downloading https://nodejs.org/dist/v16.17.0/node-v16.17.0-linux-x64.tar.xz...
8:33:34 AM: Computing checksum with sha256sum
8:33:34 AM: Checksums matched!
8:33:36 AM: Now using node v16.17.0 (npm v8.15.0)
8:33:36 AM: Started restoring cached build plugins
8:33:36 AM: Finished restoring cached build plugins
8:33:36 AM: Attempting ruby version 2.7.2, read from environment
8:33:36 AM: Using ruby version 2.7.2
8:33:37 AM: Using PHP version 8.0
8:33:37 AM: No npm workspaces detected
8:33:37 AM: Started restoring cached node modules
8:33:37 AM: Finished restoring cached node modules
8:33:37 AM: Installing NPM modules using NPM version 8.15.0
8:33:37 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
8:33:37 AM: npm WARN config location in the cache, and they are managed by
8:33:37 AM: npm WARN config [`cacache`](http://npm.im/cacache).
8:33:38 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
8:33:38 AM: npm WARN config location in the cache, and they are managed by
8:33:38 AM: npm WARN config [`cacache`](http://npm.im/cacache).
8:33:40 AM: npm ERR! code ERESOLVE
8:33:40 AM: npm ERR! ERESOLVE could not resolve
8:33:40 AM: npm ERR!
8:33:40 AM: npm ERR! While resolving: react-scripts@4.0.0
8:33:40 AM: npm ERR! Found: typescript@4.1.3
8:33:40 AM: npm ERR! node_modules/typescript
8:33:40 AM: npm ERR! dev typescript@"4.1.3" from the root project
8:33:40 AM: npm ERR!
8:33:40 AM: npm ERR! Could not resolve dependency:
8:33:40 AM: npm ERR! peerOptional typescript@"^3.2.1" from react-scripts@4.0.0
8:33:40 AM: npm ERR! node_modules/react-scripts
8:33:40 AM: npm ERR! react-scripts@"4.0.0" from the root project
8:33:40 AM: npm ERR!
8:33:40 AM: npm ERR! Conflicting peer dependency: typescript@3.9.10
8:33:40 AM: npm ERR! node_modules/typescript
8:33:40 AM: npm ERR! peerOptional typescript@"^3.2.1" from react-scripts@4.0.0
8:33:40 AM: npm ERR! node_modules/react-scripts
8:33:40 AM: npm ERR! react-scripts@"4.0.0" from the root project
8:33:40 AM: npm ERR!
8:33:40 AM: npm ERR! Fix the upstream dependency conflict, or retry
8:33:40 AM: npm ERR! this command with --force, or --legacy-peer-deps
8:33:40 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
8:33:40 AM: npm ERR!
8:33:40 AM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
8:33:40 AM: npm ERR! A complete log of this run can be found in:
8:33:40 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-08-16T15_33_38_062Z-debug-0.log
8:33:40 AM: Error during NPM install
8:33:40 AM: Build was terminated: Build script returned non-zero exit code: 1
8:33:40 AM: Creating deploy upload records
8:33:40 AM: Failing build: Failed to build site
8:33:40 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
8:33:40 AM: Finished processing build request in 9.307235828s
@blairanderson
Copy link
Author

My normal workflow for small apps:

  1. forking DEFAULT "Create React App" on codesandbox
  2. push to github repo
  3. setup NETLIFY to deploy from github

New app deploy FAILS with above errors


Solution:

Remove "typescript" dependency from package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment