Итак, у меня есть дискорд-бот, написанный на js, и я хотел разместить его на Heroku, потому что вы получаете 1000 часов хостинга в месяц бесплатно. Я прочитал некоторые руководства и прочее, но независимо от того, что я сделал, я получаю эту ошибку, когда я нажимаю sh на Heroku с git push heroku master
. (У меня настроен Procfile):
ошибка
Enumerating objects: 62, done.
Counting objects: 100% (62/62), done.
Delta compression using up to 4 threads
Compressing objects: 100% (54/54), done.
Writing objects: 100% (62/62), 8.80 KiB | 1.76 MiB/s, done.
Total 62 (delta 18), 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): 10.x
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 10.x...
remote: Downloading and installing node 10.19.0...
remote: Using default npm version: 6.13.4
remote:
remote: -----> Installing dependencies
remote: Installing node modules (package.json + package-lock)
remote:
remote: > node@13.8.0 preinstall /tmp/build_bb6a303ef77491603b3088575e05b576/node_modules/node
remote: > node installArchSpecificPackage
remote:
remote: npm ERR! code ETARGET
remote: npm ERR! notarget No matching version found for node-linux-x64@13.8.0.
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.HDmIW/_logs/2020-02-24T17_35_08_149Z-debug.log
remote: internal/modules/cjs/loader.js:638
remote: throw err;
remote: ^
remote:
remote: Error: Cannot find module 'node-linux-x64/package.json'
remote: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
remote: at Function.resolve (internal/modules/cjs/helpers.js:33:19)
remote: at ChildProcess.<anonymous> (/tmp/build_bb6a303ef77491603b3088575e05b576/node_modules/node-bin-setup/index.js:18:27)
remote: at ChildProcess.emit (events.js:198:13)
remote: at maybeClose (internal/child_process.js:982:16)
remote: at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! node@13.8.0 preinstall: `node installArchSpecificPackage`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the node@13.8.0 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.HDmIW/_logs/2020-02-24T17_35_08_183Z-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 b-r-u-h-discord-bot.
remote:
To https://git.heroku.com/b-r-u-h-discord-bot.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/b-r-u-h-discord-bot.git'
пакет. json
{
"name": "bruh-bot",
"version": "0.0.1",
"description": "This is B R U H bot ",
"main": "index.js",
"scripts": {
"test": "!test",
"start": "node index.js"
},
"author": "da_dev",
"license": "ISC",
"dependencies": {
"@discordjs/uws": "^10.149.0",
"discord.js": "^11.5.1"
},
"engines": {
"node": "10.x"
},
"devDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/da-the-dev/b-r-u-h.git"
},
"bugs": {
"url": "https://github.com/da-the-dev/b-r-u-h/issues"
},
"homepage": "https://github.com/da-the-dev/b-r-u-h#readme"
}
I провел весь день в Интернете без успеха.
Может быть, у кого-то есть идеи, как бороться с этой проблемой?