React app doesn't deploy via git repo but does with netlify-cli

Hi. I’m facing something very odd with my new React website. Note that it’s the first one i ever did, i’m still pretty new with deploying node stuff.

When netlify tries to deploy the app from the repo, it fails with the following error at the npm run build:

2:58:12 PM: /opt/build/repo/node_modules/eslint-webpack-plugin/node_modules/jest-worker/build/index.js:110
2:58:12 PM:   _ending;
2:58:12 PM:          ^
2:58:12 PM: SyntaxError: Unexpected token ;
2:58:12 PM:     at Module._compile (internal/modules/cjs/loader.js:723:23)
2:58:12 PM:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
2:58:12 PM:     at Module.load (internal/modules/cjs/loader.js:653:32)
2:58:12 PM:     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
2:58:12 PM:     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
2:58:12 PM:     at Module.require (internal/modules/cjs/loader.js:692:17)
2:58:12 PM:     at require (internal/modules/cjs/helpers.js:25:18)
2:58:12 PM:     at Object.<anonymous> (/opt/build/repo/node_modules/eslint-webpack-plugin/dist/getESLint.js:9:5)
2:58:12 PM:     at Module._compile (internal/modules/cjs/loader.js:778:30)
2:58:12 PM:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

Though, the app deploys with no issues if i use the netlify deploy --prod command from my pc and the app works there.

I tried to replace npm run build by “react-scripts build” but still nothing. and yes, the repo and my version in local are identical.

Did i do something wrong or it’s just netlify? Is there something else i can try to make it work? I don’t mind launching the netlify deply command manually but it would be neat if the deploy by the git repo would work :confused:

thanks

Hey there, @maxlefou :wave:

Sorry that you encountered an obstacle! Can you please share your most recent deploy log as well as a link to the site that is being impacted? This will help us look into your situation further.

1 Like

website: https://jmf-cv.netlify.app
The entire log:

4:40:01 PM: Build ready to start
4:40:06 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
4:40:06 PM: build-image tag: v4.10.1
4:40:06 PM: buildbot version: 4cffa5dc84445a450e8be6f710e2498d87994fae
4:40:06 PM: Fetching cached dependencies
4:40:06 PM: Starting to download cache of 4.9MB
4:40:06 PM: Finished downloading cache in 101.823943ms
4:40:06 PM: Starting to extract cache
4:40:06 PM: Finished extracting cache in 14.432425ms
4:40:06 PM: Finished fetching cache in 162.559624ms
4:40:06 PM: Starting to prepare the repo for build
4:40:07 PM: Preparing Git Reference refs/heads/master
4:40:08 PM: Parsing package.json dependencies
4:40:09 PM: Starting build script
4:40:09 PM: Installing dependencies
4:40:09 PM: Python version set to 2.7
4:40:09 PM: Downloading and installing node v10.24.1...
4:40:09 PM: Downloading https://nodejs.org/dist/v10.24.1/node-v10.24.1-linux-x64.tar.xz...
4:40:10 PM: Computing checksum with sha256sum
4:40:10 PM: Checksums matched!
4:40:12 PM: Now using node v10.24.1 (npm v6.14.12)
4:40:12 PM: Started restoring cached build plugins
4:40:12 PM: Finished restoring cached build plugins
4:40:12 PM: Attempting ruby version 2.6.2, read from environment
4:40:12 PM: Required ruby-2.6.2 is not installed - installing.
4:40:13 PM: Searching for binary rubies, this might take some time.
4:40:13 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.6.2.tar.bz2
4:40:13 PM: Checking requirements for ubuntu.
4:40:13 PM: Requirements installation successful.
4:40:13 PM: ruby-2.6.2 - #configure
4:40:13 PM: ruby-2.6.2 - #download
4:40:13 PM: ruby-2.6.2 - #validate archive
4:40:17 PM: ruby-2.6.2 - #extract
4:40:18 PM: ruby-2.6.2 - #validate binary
4:40:19 PM: ruby-2.6.2 - #setup
4:40:19 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2@global
4:40:19 PM: ruby-2.6.2 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
4:40:19 PM: ruby-2.6.2 - #generating global wrappers........
4:40:19 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2
4:40:20 PM: ruby-2.6.2 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
4:40:20 PM: ruby-2.6.2 - #generating default wrappers........
4:40:20 PM: Using /opt/buildhome/.rvm/gems/ruby-2.6.2
4:40:20 PM: Using ruby version 2.6.2
4:40:20 PM: Using PHP version 8.0
4:40:21 PM: No npm workspaces detected
4:40:21 PM: Started restoring cached node modules
4:40:21 PM: Finished restoring cached node modules
4:40:21 PM: Installing NPM modules using NPM version 6.14.12
4:40:41 PM: npm 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!
4:40:41 PM: > @fortawesome/fontawesome-common-types@6.1.2 postinstall /opt/build/repo/node_modules/@fortawesome/fontawesome-common-types
4:40:41 PM: > node attribution.js
4:40:42 PM: Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com
4:40:42 PM: License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4:40:42 PM: Copyright 2022 Fonticons, Inc.
4:40:42 PM: > core-js@3.24.1 postinstall /opt/build/repo/node_modules/core-js
4:40:42 PM: > node -e "try{require('./postinstall')}catch(e){}"
4:40:42 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
4:40:42 PM: The project needs your help! Please consider supporting of core-js:
4:40:42 PM: > https://opencollective.com/core-js 
4:40:42 PM: > https://patreon.com/zloirock 
4:40:42 PM: > bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz 
4:40:42 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
4:40:42 PM: > core-js-pure@3.24.1 postinstall /opt/build/repo/node_modules/core-js-pure
4:40:42 PM: > node -e "try{require('./postinstall')}catch(e){}"
4:40:42 PM: > esbuild@0.14.54 postinstall /opt/build/repo/node_modules/esbuild
4:40:42 PM: > node install.js
4:40:42 PM: > typeit@8.7.0 postinstall /opt/build/repo/node_modules/typeit
4:40:42 PM: > node ./scripts/notice.js
4:40:42 PM: Thanks for using TypeIt! If you're using this library commercially, please purchase a license:
4:40:42 PM: https://typeitjs.com/licenses/purchase
4:40:42 PM: > @fortawesome/fontawesome-svg-core@6.1.2 postinstall /opt/build/repo/node_modules/@fortawesome/fontawesome-svg-core
4:40:42 PM: > node attribution.js
4:40:42 PM: Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com
4:40:42 PM: License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4:40:42 PM: Copyright 2022 Fonticons, Inc.
4:40:42 PM: > @fortawesome/free-brands-svg-icons@6.1.2 postinstall /opt/build/repo/node_modules/@fortawesome/free-brands-svg-icons
4:40:42 PM: > node attribution.js
4:40:42 PM: Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com
4:40:42 PM: License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4:40:42 PM: Copyright 2022 Fonticons, Inc.
4:40:42 PM: > @fortawesome/free-solid-svg-icons@6.1.2 postinstall /opt/build/repo/node_modules/@fortawesome/free-solid-svg-icons
4:40:42 PM: > node attribution.js
4:40:42 PM: Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com
4:40:42 PM: License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4:40:42 PM: Copyright 2022 Fonticons, Inc.
4:40:43 PM: npm WARN jmf-cv-pro@1.0.0 No repository field.
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-windows-arm64@0.14.54 (node_modules/esbuild-windows-arm64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-windows-arm64@0.14.54: wanted {"os":"win32","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-windows-64@0.14.54 (node_modules/esbuild-windows-64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-windows-64@0.14.54: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-windows-32@0.14.54 (node_modules/esbuild-windows-32):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-windows-32@0.14.54: wanted {"os":"win32","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-sunos-64@0.14.54 (node_modules/esbuild-sunos-64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-sunos-64@0.14.54: wanted {"os":"sunos","arch":"x64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-openbsd-64@0.14.54 (node_modules/esbuild-openbsd-64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-openbsd-64@0.14.54: wanted {"os":"openbsd","arch":"x64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-netbsd-64@0.14.54 (node_modules/esbuild-netbsd-64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-netbsd-64@0.14.54: wanted {"os":"netbsd","arch":"x64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-linux-s390x@0.14.54 (node_modules/esbuild-linux-s390x):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-linux-s390x@0.14.54: wanted {"os":"linux","arch":"s390x"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-linux-riscv64@0.14.54 (node_modules/esbuild-linux-riscv64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-linux-riscv64@0.14.54: wanted {"os":"linux","arch":"riscv64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-linux-ppc64le@0.14.54 (node_modules/esbuild-linux-ppc64le):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-linux-ppc64le@0.14.54: wanted {"os":"linux","arch":"ppc64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-linux-mips64le@0.14.54 (node_modules/esbuild-linux-mips64le):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-linux-mips64le@0.14.54: wanted {"os":"linux","arch":"mips64el"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-linux-arm64@0.14.54 (node_modules/esbuild-linux-arm64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-linux-arm64@0.14.54: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-linux-arm@0.14.54 (node_modules/esbuild-linux-arm):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-linux-arm@0.14.54: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-linux-32@0.14.54 (node_modules/esbuild-linux-32):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-linux-32@0.14.54: wanted {"os":"linux","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-freebsd-arm64@0.14.54 (node_modules/esbuild-freebsd-arm64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-freebsd-arm64@0.14.54: wanted {"os":"freebsd","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-freebsd-64@0.14.54 (node_modules/esbuild-freebsd-64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-freebsd-64@0.14.54: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-darwin-arm64@0.14.54 (node_modules/esbuild-darwin-arm64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-darwin-arm64@0.14.54: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-darwin-64@0.14.54 (node_modules/esbuild-darwin-64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-darwin-64@0.14.54: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-android-arm64@0.14.54 (node_modules/esbuild-android-arm64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-android-arm64@0.14.54: wanted {"os":"android","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-android-64@0.14.54 (node_modules/esbuild-android-64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-android-64@0.14.54: wanted {"os":"android","arch":"x64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @esbuild/linux-loong64@0.14.54 (node_modules/@esbuild/linux-loong64):
4:40:43 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @esbuild/linux-loong64@0.14.54: wanted {"os":"linux","arch":"loong64"} (current: {"os":"linux","arch":"x64"})
4:40:43 PM: added 1477 packages from 721 contributors and audited 1498 packages in 21.309s
4:40:43 PM: 207 packages are looking for funding
4:40:43 PM:   run `npm fund` for details
4:40:43 PM: found 1 high severity vulnerability
4:40:43 PM:   run `npm audit fix` to fix them, or `npm audit` for details
4:40:43 PM: NPM modules installed
4:40:43 PM: Started restoring cached go cache
4:40:43 PM: Finished restoring cached go cache
4:40:43 PM: Installing Go version 1.12 (requested 1.12)
4:40:48 PM: unset GOOS;
4:40:48 PM: unset GOARCH;
4:40:48 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
4:40:48 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
4:40:48 PM: go version >&2;
4:40:48 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.12.linux.amd64.env"
4:40:48 PM: go version go1.12 linux/amd64
4:40:48 PM: Installing missing commands
4:40:48 PM: Verify run directory
4:40:49 PM: ​
4:40:49 PM: ────────────────────────────────────────────────────────────────
4:40:49 PM:   Netlify Build                                                 
4:40:49 PM: ────────────────────────────────────────────────────────────────
4:40:49 PM: ​
4:40:49 PM: ❯ Version
4:40:49 PM:   @netlify/build 27.11.5
4:40:49 PM: ​
4:40:49 PM: ❯ Flags
4:40:49 PM:   baseRelDir: true
4:40:49 PM:   buildId: 62fe4f4150410b4155c336a0
4:40:49 PM:   deployId: 62fe4f4150410b4155c336a2
4:40:49 PM: ​
4:40:49 PM: ❯ Current directory
4:40:49 PM:   /opt/build/repo
4:40:49 PM: ​
4:40:49 PM: ❯ Config file
4:40:49 PM:   No config file was defined: using default values.
4:40:49 PM: ​
4:40:49 PM: ❯ Context
4:40:49 PM:   production
4:40:49 PM: ​
4:40:49 PM: ────────────────────────────────────────────────────────────────
4:40:49 PM:   1. Build command from Netlify app                             
4:40:49 PM: ────────────────────────────────────────────────────────────────
4:40:49 PM: ​
4:40:49 PM: $ react-scripts build
4:40:50 PM: /opt/build/repo/node_modules/eslint-webpack-plugin/node_modules/jest-worker/build/index.js:110
4:40:50 PM:   _ending;
4:40:50 PM:          ^
4:40:50 PM: SyntaxError: Unexpected token ;
4:40:50 PM:     at Module._compile (internal/modules/cjs/loader.js:723:23)
4:40:50 PM:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
4:40:50 PM:     at Module.load (internal/modules/cjs/loader.js:653:32)
4:40:50 PM:     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
4:40:50 PM:     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
4:40:50 PM:     at Module.require (internal/modules/cjs/loader.js:692:17)
4:40:50 PM:     at require (internal/modules/cjs/helpers.js:25:18)
4:40:50 PM:     at Object.<anonymous> (/opt/build/repo/node_modules/eslint-webpack-plugin/dist/getESLint.js:9:5)
4:40:50 PM:     at Module._compile (internal/modules/cjs/loader.js:778:30)
4:40:50 PM:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
4:40:50 PM: ​
4:40:50 PM: ────────────────────────────────────────────────────────────────
4:40:50 PM:   "build.command" failed                                        
4:40:50 PM: ────────────────────────────────────────────────────────────────
4:40:50 PM: ​
4:40:50 PM:   Error message
4:40:50 PM:   Command failed with exit code 1: react-scripts build (https://ntl.fyi/exit-code-1)
4:40:50 PM: ​
4:40:50 PM:   Error location
4:40:50 PM:   In Build command from Netlify app:
4:40:50 PM:   react-scripts build
4:40:50 PM: ​
4:40:50 PM:   Resolved config
4:40:50 PM:   build:
4:40:50 PM:     command: react-scripts build
4:40:50 PM:     commandOrigin: ui
4:40:50 PM:     environment:
4:40:50 PM:       - CI
4:40:50 PM:     publish: /opt/build/repo/build
4:40:50 PM:     publishOrigin: ui
4:40:50 PM: Caching artifacts
4:40:50 PM: Started saving node modules
4:40:50 PM: Finished saving node modules
4:40:50 PM: Started saving build plugins
4:40:50 PM: Finished saving build plugins
4:40:50 PM: Started saving pip cache
4:40:50 PM: Finished saving pip cache
4:40:50 PM: Started saving emacs cask dependencies
4:40:50 PM: Finished saving emacs cask dependencies
4:40:50 PM: Started saving maven dependencies
4:40:50 PM: Finished saving maven dependencies
4:40:50 PM: Started saving boot dependencies
4:40:50 PM: Finished saving boot dependencies
4:40:50 PM: Started saving rust rustup cache
4:40:50 PM: Finished saving rust rustup cache
4:40:50 PM: Started saving go dependencies
4:40:50 PM: Finished saving go dependencies
4:40:52 PM: Cached ruby version 2.6.2
4:40:52 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:40:52 PM: Creating deploy upload records
4:40:52 PM: Failing build: Failed to build site
4:40:52 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
4:40:53 PM: Finished processing build request in 46.488815477s

Note that the website works, tho, since, as i said, deploying using netlify-cli works. but the log is what happens when netlify attempts to deploy using the git repo.

thanks :slight_smile:

Hi, @maxlefou. The error is complaining about a ; character:

4:40:50 PM: /opt/build/repo/node_modules/eslint-webpack-plugin/node_modules/jest-worker/build/index.js:110
4:40:50 PM:   _ending;
4:40:50 PM:          ^
4:40:50 PM: SyntaxError: Unexpected token ;

That is the meaning of the SyntaxError: Unexpected token ;. The “unexpected token” is the literal ; character.

I tried to take a look at the Git repo to see what may be the reason for this error. However, the repo is private and, therefore, I’m unable to examine it to learn more.

I do hope this information helps you to troubleshoot this. ​Please let us know if there are other questions about this.

This I understood well, I can read errors. Except that:

  • as the path says /opt/build/repo/node_modules/eslint-webpack-plugin/node_modules/ it doesn’t come from my repo but from a module. (Even from a module of a module) Due to how big node_modules folders can be, it’s not in the repo and is generated by npm install. (as the complete logs shows) I can’t edit files that come from modules via the deployment for obvious security reasons, and you’re normally not supposed to edit node modules files manually.
  • As I said on every of my posts so far, there are no issues at all when I use the netlify-cli. Only when I try to let netlify build from the repo. And yes, the repo and my version are identical.

I just tried again by cloning my repo and get a cleaner node-modules in local, still having the issue when deploying via git and no issues when deploying with netlify-cli.

By looking further, I’m not sure we have any more advice for you, unfortunately. This appears to be some issue with Jest of your codebase. I can see there have been some posts here and there where people have asked about this, with no clear solution, for example:

and many more if you search. Without any clarity on what’s causing the issue, it’s not possible to comment and the above search shows that this is a common issue with Jest, so might not be completely related to Netlify.

I am encountering this same issue. I am also using create react app and I am getting the same error in my logs.

React adds this dependency where babel and all the other files are hidden.

this is from my package.json the eslint-webpack-plugin is coming from the react app dependency…does netlify not support create react app builds?

“dependencies”: {
@fortawesome/fontawesome-svg-core”: “^6.2.0”,
@fortawesome/free-brands-svg-icons”: “^6.2.0”,
@fortawesome/free-regular-svg-icons”: “^6.2.0”,
@fortawesome/free-solid-svg-icons”: “^6.2.0”,
@fortawesome/react-fontawesome”: “^0.2.0”,
@testing-library/jest-dom”: “^5.16.5”,
@testing-library/react”: “^13.4.0”,
@testing-library/user-event”: “^13.5.0”,
“react”: “^18.2.0”,
“react-dom”: “^18.2.0”,
“react-scripts”: “5.0.1”,
“web-vitals”: “^2.1.4”
},
“scripts”: {
“start”: “react-scripts start”,
“build”: “react-scripts build”,
“test”: “react-scripts test”,
“eject”: “react-scripts eject”
},
“eslintConfig”: {
“extends”: [
“react-app”,
“react-app/jest”
]
},
“browserslist”: {
“production”: [
“>0.2%”,
“not dead”,
“not op_mini all”
],
“development”: [
“last 1 chrome version”,
“last 1 firefox version”,
“last 1 safari version”
]
}

Please don’t post at multiple places about the same issue.

Hi there, @tairemad :wave:

My name is Hillary and I am the Forums Moderator here at Netlify. I saw some feedback in our feedback form and just wanted to address it.

What Hrishikesh is asking above is to please not post the same / similar questions in different threads, as it is harder for the Support team to get you the timely answers we would like to. It also makes it easier for future forums member who encounter simialr issues to learn from the conversations we have! From the looks of it, it looks like we have this current thread and also this similar thread I am pasting below:

If this is a misunderstanding on our end and these are not related, please let me know.

We always welcome questions in the forums-- we love getting to help folks find success at Netlify! We just ask that if there are related questions, you keep them in one thread so that we can best assist you.

Please let me know if this is clear!

What worked for me was bumping the NODE version, which bumped the NPM version as well, as I had higher versions locally then what was used in the Netlify Build. You can do this via Environment variables.

Docs are here: Manage build dependencies | Netlify Docs

Hi @DekiGk :wave:t6: thank you so much for sharing your solution.