Не могу обойти npm ERR! notsup Неподдерживаемая платформа для fsevents@2.0.6 'ошибка при развертывании в Heroku - PullRequest
0 голосов
/ 16 мая 2019

Я провел неделю, пытаясь развернуть приложение 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 update, fsevents '*', пробовал 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>
...