尝试将React应用程序部署到Heroku时遇到这些错误

时间:2019-05-11 22:20:02

标签: ruby-on-rails reactjs heroku

这是我第一次尝试将React / Rails应用程序部署到Heroku。我尝试了一次并且能够部署,但是没有任何效果。我决定再试一次,但是尝试git push heroku master时遇到此错误,这是我遇到的错误:

// ♥ git push heroku HEAD:master
Counting objects: 33, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (33/33), done.
Writing objects: 100% (33/33), 163.69 KiB | 5.46 MiB/s, done.
Total 33 (delta 23), reused 0 (delta 0)
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):  8.15.0
remote:        engines.npm (package.json):   6.4.1
remote:        
remote:        Resolving node version 8.15.0...
remote:        Downloading and installing node 8.15.0...
remote:        npm 6.4.1 already installed with node
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@1.2.9: 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.rXvoI/_logs/2019-05-11T22_12_08_901Z-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: 
To https://git.heroku.com/faunagram-app.git
 ! [remote rejected] HEAD -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/faunagram-app.git'

这是我的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": {
      "start": "node server.js"
    },
  "dependencies": {



***** MANY DEPENDENCIES LISTED HERE ****


  : "^0.1.0",
    "xmlchars": "^1.3.1",
    "xtend": "^4.0.1",
    "y18n": "^4.0.0",
    "xregexp": "^4.0.0",
    "yallist": "^3.0.3",
    "yargs-parser": "^11.1.1",
    "yargs": "^12.0.5"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/dsound-zz/faunagram-frontend.git"
  },
  "author": "demiansims",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/dsound-zz/faunagram-frontend/issues"
  },
  "homepage": "https://github.com/dsound-zz/faunagram-frontend#readme"
}

作为菜鸟,我不确定该怎么办。我试过重新安装节点npm,为heroku清除git缓存,但没有运气。 Rails侧部署良好。 React方面就是问题。

0 个答案:

没有答案