无法推送到Heroku:找不到模块“ node-linux-x64 / package.json”

格雷格

我真的很困,非常感谢您的帮助。之前曾在这里询问此问题推送至Heroku时出错:尽管尝试了所有建议,但仍找不到模块'node-linux-x64 / package.json',但我仍然无法解决此问题。

就像最初发布问题的个人一样,我正在尝试将一个完整堆栈的Javascript应用程序推送到Heroku。

我已经重新安装了所有依赖项,甚至降级了节点和npm。

当我是Windows用户时,这个问题特别令人困惑,因此收到有关Linux模块的错误感觉很奇怪。

请帮忙。

C:\Users\Greg\Desktop\GregBots\reactbot> git push heroku master
Enumerating objects: 41, done.
Counting objects: 100% (41/41), done.
Delta compression using up to 8 threads
Compressing objects: 100% (28/28), done.
Writing objects: 100% (28/28), 19.45 KiB | 1.95 MiB/s, done.
Total 28 (delta 15), 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):  13.6.0
remote:        engines.npm (package.json):   6.13.4
remote:
remote:        Resolving node version 13.6.0...
remote:        Downloading and installing node 13.6.0...
remote:        npm 6.13.4 already installed with node
remote:
remote: -----> Restoring cache
remote:        Cached directories were not restored due to a change in version of node, npm, yarn or stack
remote:        Module installation may take longer for this build
remote:
remote: -----> Installing dependencies
remote:        Installing node modules (package.json + package-lock)
remote:
remote:        > [email protected] preinstall /tmp/build_5798122e415d759253929a4b5b0a6c16/node_modules/node
remote:        > node installArchSpecificPackage
remote:
remote:        npm ERR! code ETARGET
remote:        npm ERR! notarget No matching version found for [email protected].
remote:        npm ERR! notarget In most cases you or one of your dependencies are requesting
remote:        npm ERR! notarget a package version that doesn't exist.
remote:
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /tmp/npmcache.3VsTs/_logs/2020-02-26T01_02_25_357Z-debug.log
remote:        internal/modules/cjs/loader.js:976
remote:          throw err;
remote:          ^
remote:
remote:        Error: Cannot find module 'node-linux-x64/package.json'
remote:        Require stack:
remote:        - /tmp/build_5798122e415d759253929a4b5b0a6c16/node_modules/node/installArchSpecificPackage.js
remote:            at Function.Module._resolveFilename (internal/modules/cjs/loader.js:973:15)
remote:            at Function.resolve (internal/modules/cjs/helpers.js:78:19)
remote:            at ChildProcess.<anonymous> (/tmp/build_5798122e415d759253929a4b5b0a6c16/node_modules/node-bin-setup/index.js:18:27)
remote:            at ChildProcess.emit (events.js:321:20)
remote:            at maybeClose (internal/child_process.js:1028:16)
remote:            at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
remote:          code: 'MODULE_NOT_FOUND',
remote:          requireStack: [
remote:            '/tmp/build_5798122e415d759253929a4b5b0a6c16/node_modules/node/installArchSpecificPackage.js'
remote:          ]
remote:        }
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! errno 1
remote:        npm ERR! [email protected] preinstall: `node installArchSpecificPackage`
remote:        npm ERR! Exit status 1
remote:        npm ERR!
remote:        npm ERR! Failed at the [email protected] preinstall script.
remote:        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /tmp/npmcache.3VsTs/_logs/2020-02-26T01_02_26_775Z-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:        Some possible problems:
remote:
remote:        - A module may be missing from 'dependencies' in package.json
remote:          https://devcenter.heroku.com/articles/troubleshooting-node-deploys#ensure-you-aren-t-relying-on-untracked-dependencies
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 infinite-sea-94371.
remote:
To https://git.heroku.com/infinite-sea-94371.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/infinite-sea-94371.git'
PS C:\Users\Greg\Desktop\GregBots\reactbot>

感谢您的建议,Mazen。我已经听取了您的建议,但仍然无法部署到Heroku。现在,我已经将我的package.json附加到了Heroku上,因为Heroku根据该软件包安装了所需的依赖项。

    {
  "name": "reactbot",
  "version": "1.0.0",
  "description": "React bot",
  "main": "index.js",
  "engines": {
    "node": "13.6.0",
    "npm": "6.13.4"
  },
  "scripts": {
    "start": "node index.js",
    "backend": "nodemon index.js",
    "frontend": "npm run start --prefix client",
    "dev": "concurrently \"npm run backend\" \"npm run frontend\"",
    "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "actions-on-google": "^2.12.0",
    "body-parser": "^1.19.0",
    "dialogflow": "^1.2.0",
    "dialogflow-fulfillment": "^0.6.1",
    "express": "^4.17.1",
    "mongoose": "^5.9.2"
  },
  "devDependencies": {
    "concurrently": "^5.1.0",
    "nodemon": "^2.0.2"
  }
}
马曾

此错误可能是由多种原因引起的:

  • 根据您的错误,npm软件包node-linux-x64设置为不存在的错误版本。node-linux-x64在Heroku为其系统安装最新版本的Node.js或将其设置为现有版本时删除
  • 您是否使用代码推送了package.json文件?
  • 您已将node_module推送到Heroku,其中的某些软件包的某些版本只能在您的发行版/ OS上运行。
  • 您可能已经在全球范围内安装了npm软件包,却忘记了将其包含在packages.json文件中。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

为什么在执行Heroku推送时Heroku告诉我在模块中找不到package.json

来自分类Dev

package.json启动脚本,babel-node:在heroku部署中找不到

来自分类Dev

错误:找不到模块“ ... / node_modules / sqlite3 / lib / binding / node-v14-linux-x64 / node_sqlite3.node”

来自分类Dev

无法在Ubuntu 14.04.1 x64上为Node.js安装bcrypt

来自分类Dev

Linux x64组装

来自分类Dev

带trapi的Electron,找不到模块package.json

来自分类Dev

JavaCV RedHat Linux 6.6 x64 NoClassDefFound:无法初始化类org.bytedeco.javacpp.avutil

来自分类Dev

JavaCV RedHat Linux 6.6 x64 NoClassDefFound:无法初始化类org.bytedeco.javacpp.avutil

来自分类Dev

Steam在Arch Linux x64上不起作用

来自分类Dev

找不到MFC 9.0的x64版本

来自分类Dev

Heroku + Node:找不到模块错误

来自分类Dev

在Windows 7 x64上安装Ubuntu 11.10 x64无法启动到Ubuntu

来自分类Dev

Node.js:确定手动安装的模块和package.json的版本号

来自分类Dev

Node.js-在本地安装模块时是否需要package.json依赖项?

来自分类Dev

预期目录:node-v83-linux-x64-musl。找到:[node-v72-linux-x64-musl]

来自分类Dev

Node Sass找不到与您当前环境的绑定:具有Node.js 12.x的Linux 32位

来自分类Dev

x86_64-linux-gnu-ld找不到-lyaml

来自分类Dev

NASM Linux x64 | 将二进制编码为 base64

来自分类Dev

错误:无法读取配置文件:X:\ package.json

来自分类Dev

如何修复:npm ERR!找不到模块“ read-package-json”

来自分类Dev

错误:在导入@ applitools / eyes-selenium时找不到模块'selenium-webdriver / package.json'

来自分类Dev

Vue创建项目-找不到模块'vue-loader-v16 / package.json'

来自分类Dev

如何解决:npm ERR!找不到模块“ read-package-json”

来自分类Dev

在运行时找不到安装在本地路径的 package.json 模块

来自分类Dev

无法将我的node.js应用推送到Heroku

来自分类Dev

QT 5.6.1 Designer x64无法启动

来自分类Dev

无法在Ubuntu 12.04 x64中安装Darkice

来自分类Dev

无法在Ubuntu 12.04 x64中安装Darkice

来自分类Dev

Windows 8.1 UEFI x64无法启动UEFI映像

Related 相关文章

  1. 1

    为什么在执行Heroku推送时Heroku告诉我在模块中找不到package.json

  2. 2

    package.json启动脚本,babel-node:在heroku部署中找不到

  3. 3

    错误:找不到模块“ ... / node_modules / sqlite3 / lib / binding / node-v14-linux-x64 / node_sqlite3.node”

  4. 4

    无法在Ubuntu 14.04.1 x64上为Node.js安装bcrypt

  5. 5

    Linux x64组装

  6. 6

    带trapi的Electron,找不到模块package.json

  7. 7

    JavaCV RedHat Linux 6.6 x64 NoClassDefFound:无法初始化类org.bytedeco.javacpp.avutil

  8. 8

    JavaCV RedHat Linux 6.6 x64 NoClassDefFound:无法初始化类org.bytedeco.javacpp.avutil

  9. 9

    Steam在Arch Linux x64上不起作用

  10. 10

    找不到MFC 9.0的x64版本

  11. 11

    Heroku + Node:找不到模块错误

  12. 12

    在Windows 7 x64上安装Ubuntu 11.10 x64无法启动到Ubuntu

  13. 13

    Node.js:确定手动安装的模块和package.json的版本号

  14. 14

    Node.js-在本地安装模块时是否需要package.json依赖项?

  15. 15

    预期目录:node-v83-linux-x64-musl。找到:[node-v72-linux-x64-musl]

  16. 16

    Node Sass找不到与您当前环境的绑定:具有Node.js 12.x的Linux 32位

  17. 17

    x86_64-linux-gnu-ld找不到-lyaml

  18. 18

    NASM Linux x64 | 将二进制编码为 base64

  19. 19

    错误:无法读取配置文件:X:\ package.json

  20. 20

    如何修复:npm ERR!找不到模块“ read-package-json”

  21. 21

    错误:在导入@ applitools / eyes-selenium时找不到模块'selenium-webdriver / package.json'

  22. 22

    Vue创建项目-找不到模块'vue-loader-v16 / package.json'

  23. 23

    如何解决:npm ERR!找不到模块“ read-package-json”

  24. 24

    在运行时找不到安装在本地路径的 package.json 模块

  25. 25

    无法将我的node.js应用推送到Heroku

  26. 26

    QT 5.6.1 Designer x64无法启动

  27. 27

    无法在Ubuntu 12.04 x64中安装Darkice

  28. 28

    无法在Ubuntu 12.04 x64中安装Darkice

  29. 29

    Windows 8.1 UEFI x64无法启动UEFI映像

热门标签

归档