Бегаю по кругу с ошибками пытаюсь гит толкнуть геройку мастера и пряжу - PullRequest
2 голосов
/ 14 мая 2019

Я пытался в течение 2 дней развернуть приложение Rails / React на Heroku, и это был кошмар.Я думаю, что у меня наконец есть Rails, но сторона React - это не что иное, как горе.Последняя проблема - проблема с yarn.Я пытался обновить его.Я обновил npm, узел и т. Д.

Проблема в том, что я пытаюсь git push heroku master.Я получаю следующие ошибки, которые являются окончанием многих warning resolution incompatible ошибок.

emote:        warning Resolution field "whatwg-url@6.5.0" is incompatible with requested version "whatwg-url@^7.0.0"
remote:        error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.
remote:        info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
remote: 
remote: -----> Build failed
remote: 
remote:  !     Outdated Yarn lockfile
remote: 
remote:        Your application contains a Yarn lockfile (yarn.lock) which does not
remote:        match the dependencies in package.json. This can happen if you use npm
remote:        to install or update a dependency instead of Yarn.
remote: 
remote:        Please run the following command in your application directory and check
remote:        in the new yarn.lock file:
remote: 
remote:        $ yarn install
remote:        $ git add yarn.lock
remote:        $ git commit -m "Updated Yarn lockfile"
remote:        $ git push heroku master
remote:     
remote:        https://kb.heroku.com/why-is-my-node-js-build-failing-because-of-an-outdated-yarn-lockfile
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 faunagram-app.
remote: 
To https://git.heroku.com/faunagram-app.git
 ! [remote rejected] master -> 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": "0.1.0",
  "private": true,
  "dependencies": {
    "eslint-plugin-react": "^7.12.4",
    "fsevents": "^2.0.6",
    "ip-locator": "0.0.1",
    "iplocation": "^6.1.0",
    "react": "^16.8.4",
    "react-activestorage-provider": "^0.8.0",
    "react-dom": "^16.8.4",
    "react-geolocated": "^2.4.1",
    "react-router-dom": "^4.4.0-beta.7",
    "react-scripts": "3.0.1",
    "semantic-ui-react": "^0.86.0",
    "yarn": "^1.16.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ],
  "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",
  "devDependencies": {},
  "repository": "git+https://github.com/dsound-zz/faunagram-frontend.git",
  "author": "Demian Sims",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/dsound-zz/faunagram-frontend/issues"
  },
  "homepage": "https://github.com/dsound-zz/faunagram-frontend#readme",
  "resolutions": {
    "fsevents": "1.2.9",
    "doctrine": "3.0.0",
    "resolve": "1.1.7",
    "js-tokens": "3.0.2",
    "debug": "2.6.9",
    "ms": "2.0.0",
    "tough-cookie": "2.5.0",
    "punycode": "1.3.2",
    "extsprintf": "1.4.0",
    "@babel/runtime": "7.4.3",
    "regenerator-runtime": "0.11.1",
    "path-to-regexp": "0.1.7",
    "core-js": "2.6.5",
    "promise": "8.0.2",
    "iconv-lite": "0.4.23",
    "isarray": "1.0.0",
    "@babel/core": "7.4.4",
    "camelcase": "4.1.0",
    "fs-extra": "4.0.3",
    "jest-resolve": "24.8.0",
    "semver": "5.5.0",
    "json5": "1.0.1",
    "source-map": "0.6.1",
    "chalk": "1.1.3",
    "ansi-styles": "2.2.1",
    "supports-color": "2.0.0",
    "color-name": "1.1.4",
    "jsesc": "0.5.0",
    "minimist": "0.0.10",
    "@babel/preset-env": "7.4.4",
    "@babel/plugin-proposal-object-rest-spread": "7.4.4",
    "@babel/plugin-transform-classes": "7.4.4",
    "@babel/plugin-transform-destructuring": "7.4.4",
    "browserslist": "4.5.4",
    "cosmiconfig": "4.0.0",
    "import-fresh": "2.0.0",
    "parse-json": "2.2.0",
    "resolve-from": "3.0.0",
    "callsites": "2.0.0",
    "esprima": "3.1.3",
    "is-arrayish": "0.3.2",
    "vfile": "3.0.1",
    "parse5": "4.0.0",
    "is-buffer": "1.1.6",
    "unist-util-stringify-position": "1.1.2",
    "vfile-message": "1.1.1",
    "clone-deep": "0.2.4",
    "kind-of": "3.2.2",
    "for-own": "0.1.5",
    "lazy-cache": "0.2.7",
    "shallow-clone": "0.1.2",
    "for-in": "0.1.8",
    "isobject": "2.1.0",
    "is-extendable": "1.0.1",
    "css-select": "2.0.2",
    "css-tree": "1.0.0-alpha.29",
    "domutils": "1.7.0",
    "eslint-scope": "4.0.3",
    "slash": "1.0.0",
    "normalize-path": "2.1.1",
    "readable-stream": "3.3.0",
    "inherits": "2.0.1",
    "string_decoder": "1.1.1",
    "pump": "2.0.1",
    "string-width": "1.0.2",
    "strip-ansi": "3.0.1",
    "is-fullwidth-code-point": "1.0.0",
    "ansi-regex": "2.1.1",
    "define-property": "0.2.5",
    "extend-shallow": "2.0.1",
    "is-descriptor": "0.1.6",
    "is-accessor-descriptor": "0.1.6",
    "is-data-descriptor": "0.1.4",
    "has-value": "0.3.1",
    "set-value": "0.4.3",
    "has-values": "0.1.4",
    "find-up": "2.1.0",
    "locate-path": "2.0.0",
    "p-locate": "2.0.0",
    "path-exists": "3.0.0",
    "p-limit": "1.3.0",
    "p-try": "1.0.0",
    "read-pkg-up": "4.0.0",
    "require-main-filename": "2.0.0",
    "read-pkg": "3.0.0",
    "load-json-file": "4.0.0",
    "path-type": "3.0.0",
    "pify": "2.3.0",
    "find-cache-dir": "0.1.1",
    "pkg-dir": "2.0.0",
    "postcss-selector-parser": "3.1.1",
    "cssesc": "2.0.0",
    "ignore": "3.3.10",
    "inquirer": "6.2.2",
    "acorn": "5.7.3",
    "mimic-fn": "1.2.0",
    "wordwrap": "0.0.3",
    "commander": "2.17.1",
    "uglify-js": "3.5.12",
    "yargs": "12.0.5",
    "jsdom": "11.12.0",
    "whatwg-url": "6.5.0",
    "ws": "5.2.2",
    "decamelize": "1.2.0",
    "yargs-parser": "11.1.1",
    "address": "1.1.0",
    "globby": "6.1.0",
    "opn": "5.5.0",
    "is-glob": "3.1.0",
    "faye-websocket": "0.10.0",
    "mime": "1.4.1",
    "util": "0.10.3",
    "array-flatten": "1.1.1",
    "statuses": "1.5.0"
  }
}

Есть также файл с ошибкой пряжи:

Arguments: 
  /Users/demiansims/.nvm/versions/node/v12.2.0/bin/node /usr/local/Cellar/yarn/1.16.0/libexec/bin/yarn.js install

PATH: 
  /Users/demiansims/.nvm/versions/node/v12.2.0/bin:/Users/demiansims/.rvm/gems/ruby-2.6.0/bin:/Users/demiansims/.rvm/gems/ruby-2.6.0@global/bin:/Users/demiansims/.rvm/rubies/ruby-2.6.0/bin:/usr/local/opt/ruby/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/usr/local/git/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local/opt/ruby/bin:/usr/local:/usr/local/sbin:/Users/demiansims/.rvm/bin

Yarn version: 
  1.16.0

Node version: 
  12.2.0

Platform: 
  darwin x64

Trace: 
  SyntaxError: /Users/demiansims/Development/Faunagram/Faunagram-frontend/package.json: Unexpected token } in JSON at position 161
      at JSON.parse (<anonymous>)
      at /usr/local/Cellar/yarn/1.16.0/libexec/lib/cli.js:1625:59
      at Generator.next (<anonymous>)
      at step (/usr/local/Cellar/yarn/1.16.0/libexec/lib/cli.js:304:30)
      at /usr/local/Cellar/yarn/1.16.0/libexec/lib/cli.js:315:13

npm manifest: 
  {
    "name": "vulture",
    "version": "1.0.0",
    "description": "vulture",
    "main": "index.js",
    "private": true,
    "scripts": {
      "start": "node index.js",
    },
    "author": "vulture",
    "license": "ISC",
    "dependencies": {
      "node": "8.4.0",
      "npm": "5.4.0"
    }
  }

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Я пытался следоватьинструкции, перечисленные в ошибке, но продолжают возвращаться к этому.У меня также была проблема с установкой пряжи с чем-то, что называется fsevents, и проблема с версией используемого мной узла.Я brew updated node чтобы это исправить (я думаю).Извините за боль, но это моя первая попытка развернуть приложение, и это был просто ад.Похоже, это не должно быть так сложно.

...