1

Below error occurs when I push the project to deploy a GitHub branch:

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npmcache.SSqKk/_logs/2021-05-22T14_25_47_923Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
**npm ERR! contactKeepar@1.0.0 heroku-postbuild: `NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client`**
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the contactKeepar@1.0.0 Heroku-postbuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npmcache.SSqKk/_logs/2021-05-22T14_25_47_980Z-debug.log
-----> Build failed

*****heroku-postbuild: `NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client`*****
Ajeet Shah
  • 18,551
  • 8
  • 57
  • 87
  • https://stackoverflow.com/q/49475492/2873538 – Ajeet Shah May 22 '21 at 23:23
  • 3
    Does this answer your question? [npm install error (code EBADPLATFORM)](https://stackoverflow.com/questions/49475492/npm-install-error-code-ebadplatform) – morric May 23 '21 at 02:15

1 Answers1

0
  1. delete package-lock.json (and node_modules)
  2. npm install
  3. push new package-lock.json to GitHub

and it should work

ss5592
  • 9
  • 1
  • 3
  • Please see https://stackoverflow.com/a/54127283/555139 for an explanation of why you should not delete package-lock.json. – joshden Aug 09 '22 at 16:39