felixrieseberg/npm-windows-upgrade

Couldnt push app to heroku after installing the dependency

CaesarBourne opened this issue · 2 comments

Installing node modules (package.json)
remote: npm ERR! code EBADPLATFORM
remote: npm ERR! notsup Unsupported platform for npm-windows-upgrade@6.0.1: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})
remote: npm ERR! notsup Valid OS: win32
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.wbnbG/_logs/2019-08-06T14_26_55_654Z-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: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
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 gentle-atoll-68968.

i'm facing the same issue , there is something wrong when using windows related stuff in linux based environment i believe ( if i'm correct heroku uses linux based ) ,
windows-build-tools@5.2.2 is causing the problem ??

remote: npm ERR! notsup Unsupported platform for windows-build-tools@5.2.2: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})

My error

Enumerating objects: 136, done.
Counting objects: 100% (136/136), done.
Delta compression using up to 4 threads
Compressing objects: 100% (132/132), done.
Writing objects: 100% (136/136), 211.45 KiB | 4.07 MiB/s, done.
Total 136 (delta 69), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> React.js (create-react-app) multi app detected
remote: =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
remote: =====> Detected Framework: Multipack
remote: =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
remote: =====> Detected Framework: Node.js
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 12.x...
remote: Downloading and installing node 12.16.1...
remote: Using default npm version: 6.13.4
remote:
remote: -----> Installing dependencies
remote: Installing node modules (package.json + package-lock)
remote: npm ERR! code EBADPLATFORM
remote: npm ERR! notsup Unsupported platform for windows-build-tools@5.2.2: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})
remote: npm ERR! notsup Valid OS: win32
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.LwMWn/_logs/2020-03-06T14_09_42_324Z-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-version
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile React.js (create-react-app) multi app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to shamz-chatapp.
remote:

how do we solve this heroku error ?

There seems to be some platform specificity issue around the whole thing. I encountered the problem while trying to deploy to Heroku, I did the following, the build became successful and the deployment worked afterward. So kindly do the following:

  • Add your preferred version of fsevents to optionalDependencies in your package.json

  • Run npm install afterward.

  • I assume you do not currently have an entry for optionalDependencies in your package.json, so here you go:

    "optionalDependencies": { "fsevents": "2.x.x" }