I am trying to push a repository on Heroku but I receive the following error message :
remote: npm ERR! code EBADPLATFORM
remote: npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
remote: npm ERR! notsup Valid OS: darwin
remote: npm ERR! notsup Valid Arch: any
remote: npm ERR! notsup Actual OS: linux
remote: npm ERR! notsup Actual Arch: x64
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.FM9ZL/_logs/2021-03-22T20_17_38_119Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! backend@0.0.0 heroku-postbuild: `cd moodzle && npm install && npm run build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the backend@0.0.0 heroku-postbuild script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.FM9ZL/_logs/2021-03-22T20_17_38_183Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: Some possible problems:
remote:
remote: - Node version not specified in package.json
remote: https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-versio
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to blooming-hamlet-25452.
remote:
My front in React is named "moodzle" and is located in my backend project.
In my Back's package Json, I wrote :
"scripts": {
"start": "node ./bin/www",
"heroku-postbuild": "cd moodzle && npm install && npm run build"
},
and in my app.js : app.use(express.static(path.join(__dirname, "moodzle/build")));
Can you please help me ?
Thank you !
Rache!