错误:找不到模块“node-linux-x64/package.json” - 第一次推送到 Heroku

Ale*_*ale 5 heroku node.js npm

我第一次尝试推送到 Heroku,但收到以下错误:

\n

Error: Cannot find module \'node-linux-x64/package.json\'

\n

我已经尝试实施这些 stackoverflow 问题的解决方案,但没有成功。1 2 3

\n

这是完整的日志:

\n
    Enumerating objects: 1109, done.\n    Counting objects: 100% (1109/1109), done.\n    Delta compression using up to 8 threads\n    Compressing objects: 100% (1045/1045), done.\n    Writing objects: 100% (1109/1109), 33.55 MiB | 924.00 KiB/s, done.\n    Total 1109 (delta 334), reused 0 (delta 0)\n    remote: Compressing source files... done.\n    remote: Building source:\n    remote: \n    remote: -----> Node.js app detected\n    remote:        \n    remote: -----> Creating runtime environment\n    remote:        \n    remote:        NPM_CONFIG_LOGLEVEL=error\n    remote:        NODE_ENV=production\n    remote:        NODE_MODULES_CACHE=true\n    remote:        NODE_VERBOSE=false\n    remote:        \n    remote: -----> Installing binaries\n    remote:        engines.node (package.json):  14.x\n    remote:        engines.npm (package.json):   6.x\n    remote:        \n    remote:        Resolving node version 14.x...\n    remote:        Downloading and installing node 14.5.0...\n    remote:        Bootstrapping npm 6.x (replacing 6.14.5)...\n    remote:        npm 6.x installed\n    remote:        \n    remote: -----> Installing dependencies\n    remote:        Installing node modules\n    remote:        \n    remote:        > node@14.4.0 preinstall /tmp/build_b95d3fdd/node_modules/node\n    remote:        > node installArchSpecificPackage\n    remote:        \n    remote:        /tmp/build_b95d3fdd/node_modules/.bin/node: 1: /tmp/build_b95d3fdd/node_modules/.bin/node: \xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd: not found\n    remote:        /tmp/build_b95d3fdd/node_modules/.bin/node: 1: /tmp/build_b95d3fdd/node_modules/.bin/node: Syntax error: ")" unexpected\n    remote:        internal/modules/cjs/loader.js:1033\n    remote:          throw err;\n    remote:          ^\n    remote:        \n    remote:        Error: Cannot find module \'node-linux-x64/package.json\'\n    remote:        Require stack:\n    remote:        - /tmp/build_b95d3fdd/node_modules/node/installArchSpecificPackage.js\n    remote:            at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)\n    remote:            at Function.resolve (internal/modules/cjs/helpers.js:81:19)\n    remote:            at ChildProcess.<anonymous> (/tmp/build_b95d3fdd/node_modules/node-bin-setup/index.js:18:27)\n    remote:            at ChildProcess.emit (events.js:314:20)\n    remote:            at maybeClose (internal/child_process.js:1051:16)\n    remote:            at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {\n    remote:          code: \'MODULE_NOT_FOUND\',\n    remote:          requireStack: [\n    remote:            \'/tmp/build_b95d3fdd/node_modules/node/installArchSpecificPackage.js\'\n    remote:          ]\n    remote:        }\n    remote:        npm ERR! code ELIFECYCLE\n    remote:        npm ERR! errno 1\n    remote:        npm ERR! node@14.4.0 preinstall: `node installArchSpecificPackage`\n    remote:        npm ERR! Exit status 1\n    remote:        npm ERR! \n    remote:        npm ERR! Failed at the node@14.4.0 preinstall script.\n    remote:        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n    remote:        \n    remote:        npm ERR! A complete log of this run can be found in:\n    remote:        npm ERR!     /tmp/npmcache.AEViv/_logs/2020-07-21T21_21_11_043Z-debug.log\n    remote: \n    remote: -----> Build failed\n    remote:        \n    remote:        We\'re sorry this build is failing! You can troubleshoot common issues here:\n    remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys\n    remote:        \n    remote:        Some possible problems:\n    remote:        \n    remote:        - A module may be missing from \'dependencies\' in package.json\n    remote:          https://devcenter.heroku.com/articles/troubleshooting-node-deploys#ensure-you-aren-t-relying-on-untracked-dependencies\n    remote:        \n    remote:        Love,\n    remote:        Heroku\n    remote:        \n    remote:  !     Push rejected, failed to compile Node.js app.\n    remote: \n    remote:  !     Push failed\n    remote: Verifying deploy...\n    remote: \n    remote: !       Push rejected to lapwing.\n    remote: \n    To https://git.heroku.com/lapwing.git\n     ! [remote rejected] master -> master (pre-receive hook declined)\n    error: failed to push some refs to \'https://git.heroku.com/lapwing.git\'\n\n
Run Code Online (Sandbox Code Playgroud)\n

我不确定下一步该做什么。我似乎没有未跟踪的依赖项,卸载了所有全局依赖项,并完成了整个Heroku 故障排除指南

\n

这是我的package.json,以防package-lock.json万一有用:

\n
    {\n      "name": "magnetic-leads",\n      "version": "1.0.0",\n      "description": "",\n      "main": "index.html",\n      "scripts": {\n        "test": "echo \\"Error: no test specified\\" && exit 1"\n      },\n      "author": "Alex Vale",\n      "license": "ISC",\n      "dependencies": {\n        "body-parser": "^1.19.0",\n        "express": "^4.17.1",\n        "graphql-request": "^2.0.0",\n        "node": "^14.4.0",\n        "node-darwin-x64": "^14.5.0",\n        "node-fetch": "^2.6.0",\n        "path": "^0.12.7"\n      },\n      "engines": {\n        "node": "14.x",\n        "npm": "6.x"\n      }\n    }\n\n
Run Code Online (Sandbox Code Playgroud)\n
    {\n      "name": "magnetic-leads",\n      "version": "1.0.0",\n      "lockfileVersion": 1,\n      "requires": true,\n      "dependencies": {\n        "accepts": {\n          "version": "1.3.7",\n          "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",\n          "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",\n          "requires": {\n            "mime-types": "~2.1.24",\n            "negotiator": "0.6.2"\n          }\n        },\n        "array-flatten": {\n          "version": "1.1.1",\n          "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",\n          "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="\n        },\n        "body-parser": {\n          "version": "1.19.0",\n          "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",\n          "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",\n          "requires": {\n            "bytes": "3.1.0",\n            "content-type": "~1.0.4",\n            "debug": "2.6.9",\n            "depd": "~1.1.2",\n            "http-errors": "1.7.2",\n            "iconv-lite": "0.4.24",\n            "on-finished": "~2.3.0",\n            "qs": "6.7.0",\n            "raw-body": "2.4.0",\n            "type-is": "~1.6.17"\n          }\n        },\n        "bytes": {\n          "version": "3.1.0",\n          "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",\n          "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="\n        },\n        "content-disposition": {\n          "version": "0.5.3",\n          "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",\n          "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",\n          "requires": {\n            "safe-buffer": "5.1.2"\n          }\n        },\n        "content-type": {\n          "version": "1.0.4",\n          "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",\n          "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="\n        },\n        "cookie": {\n          "version": "0.4.0",\n          "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",\n          "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="\n        },\n        "cookie-signature": {\n          "version": "1.0.6",\n          "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",\n          "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="\n        },\n        "debug": {\n          "version": "2.6.9",\n          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",\n          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",\n          "requires": {\n            "ms": "2.0.0"\n          }\n        },\n        "depd": {\n          "version": "1.1.2",\n          "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",\n          "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="\n        },\n        "destroy": {\n          "version": "1.0.4",\n          "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",\n          "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="\n        },\n        "ee-first": {\n          "version": "1.1.1",\n          "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",\n          "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="\n        },\n        "encodeurl": {\n          "version": "1.0.2",\n          "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",\n          "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="\n        },\n        "escape-html": {\n          "version": "1.0.3",\n          "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",\n          "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="\n        },\n        "etag": {\n          "version": "1.8.1",\n          "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",\n          "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="\n        },\n        "express": {\n          "version": "4.17.1",\n          "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",\n          "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",\n          "requires": {\n            "accepts": "~1.3.7",\n            "array-flatten": "1.1.1",\n            "body-parser": "1.19.0",\n            "content-disposition": "0.5.3",\n            "content-type": "~1.0.4",\n            "cookie": "0.4.0",\n            "cookie-signature": "1.0.6",\n            "debug": "2.6.9",\n            "depd": "~1.1.2",\n            "encodeurl": "~1.0.2",\n            "escape-html": "~1.0.3",\n            "etag": "~1.8.1",\n            "finalhandler": "~1.1.2",\n            "fresh": "0.5.2",\n            "merge-descriptors": "1.0.1",\n            "methods": "~1.1.2",\n            "on-finished": "~2.3.0",\n            "parseurl": "~1.3.3",\n            "path-to-regexp": "0.1.7",\n            "proxy-addr": "~2.0.5",\n            "qs": "6.7.0",\n            "range-parser": "~1.2.1",\n            "safe-buffer": "5.1.2",\n            "send": "0.17.1",\n            "serve-static": "1.14.1",\n            "setprototypeof": "1.1.1",\n            "statuses": "~1.5.0",\n            "type-is": "~1.6.18",\n            "utils-merge": "1.0.1",\n            "vary": "~1.1.2"\n          }\n        },\n        "finalhandler": {\n          "version": "1.1.2",\n          "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",\n          "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",\n          "requires": {\n            "debug": "2.6.9",\n            "encodeurl": "~1.0.2",\n            "escape-html": "~1.0.3",\n            "on-finished": "~2.3.0",\n            "parseurl": "~1.3.3",\n            "statuses": "~1.5.0",\n            "unpipe": "~1.0.0"\n          }\n        },\n        "forwarded": {\n          "version": "0.1.2",\n          "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",\n          "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="\n        },\n        "fresh": {\n          "version": "0.5.2",\n          "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",\n          "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="\n        },\n        "graphql-request": {\n          "version": "2.0.0",\n          "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-2.0.0.tgz",\n          "integrity": "sha512-Ww3Ax+G3l2d+mPT8w7HC9LfrKjutnCKtnDq7ZZp2ghVk5IQDjwAk3/arRF1ix17Ky15rm0hrSKVKxRhIVlSuoQ=="\n        },\n        "http-errors": {\n          "version": "1.7.2",\n          "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",\n          "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",\n          "requires": {\n            "depd": "~1.1.2",\n            "inherits": "2.0.3",\n            "setprototypeof": "1.1.1",\n            "statuses": ">= 1.5.0 < 2",\n            "toidentifier": "1.0.0"\n          }\n        },\n        "iconv-lite": {\n          "version": "0.4.24",\n          "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",\n          "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",\n          "requires": {\n            "safer-buffer": ">= 2.1.2 < 3"\n          }\n        },\n        "inherits": {\n          "version": "2.0.3",\n          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",\n          "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="\n        },\n        "ipaddr.js": {\n          "version": "1.9.1",\n          "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",\n          "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="\n        },\n        "media-typer": {\n          "version": "0.3.0",\n          "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",\n          "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="\n        },\n        "merge-descriptors": {\n          "version": "1.0.1",\n          "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",\n          "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="\n        },\n        "methods": {\n          "version": "1.1.2",\n          "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",\n          "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="\n        },\n        "mime": {\n          "version": "1.6.0",\n          "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",\n          "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="\n        },\n        "mime-db": {\n          "version": "1.44.0",\n          "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",\n          "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="\n        },\n        "mime-types": {\n          "version": "2.1.27",\n          "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",\n          "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",\n          "requires": {\n            "mime-db": "1.44.0"\n          }\n        },\n        "ms": {\n          "version": "2.0.0",\n          "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",\n          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="\n        },\n        "negotiator": {\n          "version": "0.6.2",\n          "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",\n          "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="\n        },\n        "node": {\n          "version": "14.4.0",\n          "resolved": "https://registry.npmjs.org/node/-/node-14.4.0.tgz",\n          "integrity": "sha512-uJ9LXT9OjBEZaFtyVxSPxLfVCPZ9TPUtyqqxSyDazj2Vj40S9sL3b1hKnctktnwTG8IMqDsUnQ6HOplDS1RuMQ==",\n          "requires": {\n            "node-bin-setup": "^1.0.0"\n          }\n        },\n        "node-bin-setup": {\n          "version": "1.0.6",\n          "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.0.6.tgz",\n          "integrity": "sha512-uPIxXNis1CRbv1DwqAxkgBk5NFV3s7cMN/Gf556jSw6jBvV7ca4F9lRL/8cALcZecRibeqU+5dFYqFFmzv5a0Q=="\n        },\n        "node-darwin-x64": {\n          "version": "14.5.0",\n          "resolved": "https://registry.npmjs.org/node-darwin-x64/-/node-darwin-x64-14.5.0.tgz",\n          "integrity": "sha512-WoCUoKWhTia7pVCrqVziuUFJpeQd90Y2P78Nl+3tFuLMiMQQSGh7ET8JXTZHnLwUHR6UaYJ6rpsHUUnsqRiAcQ=="\n        },\n        "node-fetch": {\n          "version": "2.6.0",\n          "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",\n          "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="\n        },\n        "on-finished": {\n          "version": "2.3.0",\n          "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",\n          "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",\n          "requires": {\n            "ee-first": "1.1.1"\n          }\n        },\n        "parseurl": {\n          "version": "1.3.3",\n          "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",\n          "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="\n        },\n        "path": {\n          "version": "0.12.7",\n          "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",\n          "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",\n          "requires": {\n            "process": "^0.11.1",\n            "util": "^0.10.3"\n          }\n        },\n        "path-to-regexp": {\n          "version": "0.1.7",\n          "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",\n          "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="\n        },\n        "process": {\n          "version": "0.11.10",\n          "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",\n          "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="\n        },\n        "proxy-addr": {\n          "version": "2.0.6",\n          "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",\n          "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==",\n          "requires": {\n            "forwarded": "~0.1.2",\n            "ipaddr.js": "1.9.1"\n          }\n        },\n        "qs": {\n          "version": "6.7.0",\n          "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",\n          "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="\n        },\n        "range-parser": {\n          "version": "1.2.1",\n          "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",\n          "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="\n        },\n        "raw-body": {\n          "version": "2.4.0",\n          "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",\n