无法解决'npm ERR!尝试部署到Heroku时,notsup fsevents@2.0.6不受支持的平台错误

时间:2019-05-16 13:59:56

标签: reactjs heroku fsevents

我已经花了一个星期的时间来尝试将Rails / React应用程序部署到Heroku,并尝试了许多解决方案,但无法解决fsevents文件中的package-json的问题。这是不断出现的错误。

remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Node.js app detected
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):  10.15.0
remote:        engines.npm (package.json):   unspecified (use default)
remote:        
remote:        Resolving node version 10.15.0...
remote:        Downloading and installing node 10.15.0...
remote:        Using default npm version: 6.4.1
remote:        
remote: -----> Installing dependencies
remote:        Installing node modules (package.json + package-lock)
remote:        npm ERR! code EBADPLATFORM
remote:        npm ERR! notsup Unsupported platform for fsevents@2.0.6: 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.ahbQp/_logs/2019-05-16T13_52_58_128Z-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 faunagram-app.
remote: 

我尝试过npm updatefsevents '*',尝试过yarn而不是npm,等等。有人有新想法吗?我也不确定要在Procfile中放入什么来启动我的React应用程序,但这是另一个问题。

此外,这是我的package-json文件的顶部:

{
  "name": "faunagram-frontend",
  "version": "1.0.0",
  "description": "An informative and social media app for all things urban wildlife. As our urban centers have cleaned up through the years, many animal species are returning. This app allows for people to share sightings of these creatures. See video DEMO here. Screenshot",
  "main": "index.js",
  "proxy": {
    "/api": {
      "target": "http://localhost:9000"
    }
  },
  "scripts": {
    "heroku-prebuild": "npm i -f",
    "heroku-postbuild": "npm run build",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
<too many to list here>

0 个答案:

没有答案