ageddesi/Mocked-API

Deployment Failure.

ageddesi opened this issue · 3 comments

Oct 13 08:21:12 AM ==> Running build command 'npm install'...
Oct 13 08:21:14 AM npm ERR! code EBADPLATFORM
Oct 13 08:21:14 AM npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
Oct 13 08:21:14 AM npm ERR! notsup Valid OS: darwin
Oct 13 08:21:14 AM npm ERR! notsup Valid Arch: any
Oct 13 08:21:14 AM npm ERR! notsup Actual OS: linux
Oct 13 08:21:14 AM npm ERR! notsup Actual Arch: x64
Oct 13 08:21:14 AM
Oct 13 08:21:14 AM npm ERR! A complete log of this run can be found in:
Oct 13 08:21:14 AM npm ERR! /opt/render/.cache/_logs/2022-10-13T07_21_14_296Z-debug.log
Oct 13 08:21:14 AM ==> Build failed 😞

The package causing this error is fsevents. The reason why you are getting this error is fsevents only supports macOS.

I used your Docker Compose file and ran the npm install command. I wasn't able to replicate this issue. I'm running Docker on a Macbook. I also ran npm explain fsevents and found no dependencies of fsevents in the Mock API dependency tree.

Where are you executing the npm install command, e.g. in a CI/CD pipeline or locally?

I have now resolved this issue. For us it was Jest dependency. As we do not need this when deploying I marked it as a optional dependency in our package.json.

"optionalDependencies": {
    "fsevents" : "~2.3.2"
  },

Thank mate. You helped me to solve my issue as well