Deployment Error React App

Issues information

Deployment Error

failed to be build: Cannot build Application “z5f3282d9” due to an error with docker: ExitStatusError { exit_status: ExitStatus(unix_wait_status(256))

add:
npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

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!

Dockerfile content (if any)
template from documentation
FROM node:13-alpine RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY . . RUN npm install EXPOSE 3000 CMD node ./bin/www

Hello,
I guess you’re working on a Mac so NPM probably set the os to Darwin. Could you try to add

"os": [
        "darwin",
        "win32",
        "linux"
      ],

in the package-lock.json for fsevents ?

Another solution could be to add the force flag (-f) to your npm install but I’m not fan of this because you could miss other issues.

Thx Enzo for this advice.
error solved with fsevents as optional dependencies

2 Likes