could anyone help me, please?
I know very little of programming, still, I managed to create a Discord bot for a server. Initially, it worked perfectly, but one day I couldn't deploy it on Heroku anymore when I made any change on the bot.
Here is the error message:
$ git push heroku master
Enumerating objects: 24, done.
Counting objects: 100% (24/24), done.
Delta compression using up to 4 threads
Compressing objects: 100% (19/19), done.
Writing objects: 100% (19/19), 1.75 KiB | 895.00 KiB/s, done.
Total 19 (delta 14), reused 0 (delta 0), pack-reused 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): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 12.x...
remote: Downloading and installing node 12.19.0...
remote: Using default npm version: 6.14.8
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: Prebuild detected (node_modules already exists)
remote: Rebuilding any native modules
remote:
remote: > node-cron#2.0.3 postinstall /tmp/build_d666c44d/node_modules/node-cron
remote: > opencollective-postinstall
remote:
remote: sh: 1: opencollective-postinstall: Permission denied
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 126
remote: npm ERR! node-cron#2.0.3 postinstall: `opencollective-postinstall`
remote: npm ERR! Exit status 126
remote: npm ERR!
remote: npm ERR! Failed at the node-cron#2.0.3 postinstall 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.Miyop/_logs/2020-11-16T21_23_56_325Z-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: - node_modules checked into source control
remote: https://devcenter.heroku.com/articles/node-best-practices#only-git-the-important-bits
remote:
remote: - Node version not specified in package.json
remote: https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
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 gale-explorer.
remote:
To https://git.heroku.com/gale-explorer.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/gale-explorer.git'
Could anyone help me with a detailed step-by-step procedure?
Thank you so very much.
Related
this was perfectly fine until i added a server to my cleint that was running with buildpacks mars/...
I made sure to remove all buildpacks with buildpacks:remove mars/...
I also tried heroku buildpacks:set heroku/nodejs
I also tried the git push heroku main:main
I am not sure but i think it maybe something with permissions but i may be wrong since i am new to heroku.
git push heroku main
Enumerating objects: 74, done.
Counting objects: 100% (74/74), done.
Delta compression using up to 12 threads
Compressing objects: 100% (53/53), done.
Writing objects: 100% (68/68), 290.70 KiB | 58.14 MiB/s, done.
Total 68 (delta 15), reused 62 (delta 13), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 12.16.2
remote: engines.npm (package.json): 6.14.6
remote:
remote: Resolving node version 12.16.2...
remote: Downloading and installing node 12.16.2...
remote: Bootstrapping npm 6.14.6 (replacing 6.14.4)...
remote: npm 6.14.6 installed
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
remote:
remote: > fsevents#1.2.13 install /tmp/build_ff6289e7/node_modules/fsevents
remote: > node install.js
remote:
remote:
remote: Skipping 'fsevents' build as platform linux is not supported
remote:
remote: > nodemon#1.19.4 postinstall /tmp/build_ff6289e7/node_modules/nodemon
remote: > node bin/postinstall || exit 0
remote:
remote: Love nodemon? You can now support the project via the open collective:
remote: > https://opencollective.com/nodemon/donate
remote:
remote: added 375 packages in 6.258s
remote:
remote: -----> Build
remote: Detected both "build" and "heroku-postbuild" scripts
remote: Running heroku-postbuild
remote:
remote: > everestminds-task#1.0.0 heroku-postbuild /tmp/build_ff6289e7
remote: > cd client && npm install && npm install --only=dev --no-shrinkwrap && npm run build
remote:
remote:
remote: > node-sass#6.0.1 install /tmp/build_ff6289e7/client/node_modules/node-sass
remote: > node scripts/install.js
remote:
remote: Downloading binary from https://github.com/sass/node-sass/releases/download/v6.0.1/linux-x64-72_binding.node
remote: Download complete
remote: Binary saved to /tmp/build_ff6289e7/client/node_modules/node-sass/vendor/linux-x64-72/binding.node
remote: Caching binary to /tmp/npmcache.vnweW/node-sass/6.0.1/linux-x64-72_binding.node
remote:
remote: > core-js#3.6.5 postinstall /tmp/build_ff6289e7/client/node_modules/#firebase/polyfill/node_modules/core-js
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote:
remote: > core-js#2.6.12 postinstall /tmp/build_ff6289e7/client/node_modules/babel-runtime/node_modules/core-js
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote:
remote: > core-js#3.14.0 postinstall /tmp/build_ff6289e7/client/node_modules/core-js
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote:
remote: > core-js-pure#3.14.0 postinstall /tmp/build_ff6289e7/client/node_modules/core-js-pure
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote:
remote: > ejs#2.7.4 postinstall /tmp/build_ff6289e7/client/node_modules/ejs
remote: > node ./postinstall.js
remote:
remote:
remote: > protobufjs#6.11.2 postinstall /tmp/build_ff6289e7/client/node_modules/protobufjs
remote: > node scripts/postinstall
remote:
remote:
remote: > node-sass#6.0.1 postinstall /tmp/build_ff6289e7/client/node_modules/node-sass
remote: > node scripts/build.js
remote:
remote: Binary found at /tmp/build_ff6289e7/client/node_modules/node-sass/vendor/linux-x64-72/binding.node
remote: Testing binary
remote: Binary is fine
remote: added 2146 packages from 876 contributors and audited 2150 packages in 55.156s
remote:
remote: 151 packages are looking for funding
remote: run npm fund for details
remote:
remote: found 7 vulnerabilities (3 moderate, 4 high)
remote: run npm audit fix to fix them, or npm audit for details
remote: audited 2150 packages in 14.59s
remote:
remote: 151 packages are looking for funding
remote: run npm fund for details
remote:
remote: found 7 vulnerabilities (3 moderate, 4 high)
remote: run npm audit fix to fix them, or npm audit for details
remote:
remote: > everestminds-task#0.1.0 build /tmp/build_ff6289e7/client
remote: > react-scripts build
remote:
remote: Creating an optimized production build...
remote: Failed to compile.
remote:
remote: Can't find self.__WB_MANIFEST in your SW source.
remote:
remote:
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! everestminds-task#0.1.0 build: react-scripts build
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the everestminds-task#0.1.0 build 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.vnweW/_logs/2021-06-27T21_07_28_897Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! everestminds-task#1.0.0 heroku-postbuild: cd client && npm install && npm install --only=dev --no-shrinkwrap && npm run build
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the everestminds-task#1.0.0 heroku-postbuild 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.vnweW/_logs/2021-06-27T21_07_28_915Z-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: !
remote: ! ## Warning - The same version of this code has already been built: 2c4fee55f03ca310626cd12afa9d269f1d95cc34
remote: !
remote: ! We have detected that you have triggered a build from source code with version 2c4fee55f03ca310626cd12afa9d269f1d95cc34
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku :main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to everestminds-task.
remote:
To https://git.heroku.com/everestminds-task.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/everestminds-task.git'
server package.json
{
"name": "everestminds-task",
"version": "1.0.0",
"engines": {
"node": "12.16.2",
"npm": "6.14.6"
},
"scripts": {
"client": "cd client && npm start",
"server": "nodemon server.js",
"build": "cd client && npm run build",
"dev": "concurrently --kill-others-on-fail \"npm run server\" \"npm run client\"",
"start": "node server.js",
"heroku-postbuild": "cd client && npm install && npm install --only=dev --no-shrinkwrap && npm run build"
},
"dependencies": {
"body-parser": "^1.18.3",
"cors": "2.8.5",
"dotenv": "7.0.0",
"express": "^4.16.4",
"stripe": "6.28.0"
},
"devDependencies": {
"concurrently": "^4.0.1",
"nodemon": "^1.19.1"
}
}
Client package.json
{
"name": "everestminds-task",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:5000",
"dependencies": {
"#testing-library/jest-dom": "^5.14.1",
"#testing-library/react": "^11.2.7",
"#testing-library/user-event": "^12.8.3",
"axios": "^0.21.1",
"express-sslify": "^1.2.0",
"firebase": "^8.6.8",
"node-sass": "^6.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-stripe-checkout": "^2.6.3",
"redux": "^4.1.0",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"reselect": "^4.0.0",
"styled-components": "^5.3.0",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
thanks for the help in advance
Alright, for anyone who comes across this. I found the problem, it was the serviceworker.js... it seems that "Can't find self.__WB_MANIFEST in your SW source" has something to do with it.
create-react-app no longer comes with service-worker.js. So it maybe that I need to install a package that "swSrc" or something I am not sure yet.
I have an application deployed on Heroku and I have not had problems redeploying it, up until yesterday.
I had to upgrade one of the dependencies in my package-lock.json/yarn.lock files and when trying to upload it to Heroku, I get the following:
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.15.x
remote: engines.npm (package.json): 6.14.x
remote:
remote: Resolving node version 10.15.x...
remote: Downloading and installing node 10.15.3...
remote: Bootstrapping npm 6.14.x (replacing 6.4.1)...
remote: npm 6.14.x installed
remote:
remote: -----> Installing dependencies
remote: Installing node modules (package.json + package-lock)
remote: npm ERR! code EINTEGRITY
remote: npm ERR! sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= integrity checksum failed when using sha1: wanted sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= but got sha512-rIqbOrKb8GJmx/5bc2M0QchhUouMXSpd1RTclXsB41JdL+VtnojfaJR+h7F9k18/4kHUsBFgk80Uk+q569vjPA== sha1-sAoAIwoRCMSMFp5popGq/aOqzWM=. (7897 bytes)
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.P3BnU/_logs/2020-03-18T06_17_36_985Z-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
I realize the problem resides within this line:
npm ERR! code EINTEGRITY
remote: npm ERR! sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= integrity checksum failed when using sha1: wanted sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= but got sha512-rIqbOrKb8GJmx/5bc2M0QchhUouMXSpd1RTclXsB41JdL+VtnojfaJR+h7F9k18/4kHUsBFgk80Uk+q569vjPA== sha1-sAoAIwoRCMSMFp5popGq/aOqzWM=. (7897 bytes)
but I do not know why it is occurring now or what triggered it (as it did not happen before).
I have tried searching online and clearing the cache, reading Heroku's Node.js Troubleshooting, adding an engines key to my package.json file to specify node/npm versions, but nothing works.
I have NOT upgraded Node/NPM in my development environment, so those versions are the same.
Per #TinNguyen's comment, I executed the following commands:
npm uninstall package_name
and then :
npm install package_name
and that seemed to fix the issue.
I simply deleted package-lock.json and npm modules, then run npm install.
I had the same issue and fixed it.
Probably you have npm vulnerabilities and if you cant fix them all
try upgrading all you packages in package.json
useful tool is
npm install -g npm-check-updates
then
ncu --upgrade
then
npm install
make sure to delete package-lock.json before npm install
Simply: delete package-lock.json and run npm install
heroku give error when try to push adonis code
When i am trying to deploy adonis app on heroku some of its database is upload successfully deployed but all the tables are not shown on heroku postgres database.
I have five table in database but on heroku i found only three tables so how can i deploy this successfully.
On locally system this is running successfully.
on run git push heroku master command
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 358 bytes | 358.00 KiB/s, done.
Total 4 (delta 3), 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): 12.13.1
remote: engines.npm (package.json): ~6.13.1
remote:
remote: Resolving node version 12.13.1...
remote: Downloading and installing node 12.13.1...
remote: Bootstrapping npm ~6.13.1 (replacing 6.12.1)...
remote: npm ~6.13.1 installed
remote:
remote: -----> Restoring cache
remote: - node_modules
remote:
remote: -----> Installing dependencies
remote: Installing node modules (package.json)
remote: audited 4233 packages in 4.099s
remote:
remote: 4 packages are looking for funding
remote: run `npm fund` for details
remote:
remote: found 2 high severity vulnerabilities
remote: run `npm audit fix` to fix them, or `npm audit` for details
remote:
remote: -----> Build
remote:
remote: -----> Caching build
remote: - node_modules
remote:
remote: -----> Pruning devDependencies
remote: audited 4233 packages in 4.391s
remote:
remote: 4 packages are looking for funding
remote: run `npm fund` for details
remote:
remote: found 2 high severity vulnerabilities
remote: run `npm audit fix` to fix them, or `npm audit` for details
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> release, web
remote:
remote: -----> Compressing...
remote: Done: 29.7M
remote: -----> Launching...
remote: ! Release command declared: this new release will not be available until the command succeeds.
remote: Released v20
remote: https://elooopin.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
remote: Running release command...
remote:
remote: error: type "undefined" does not exist
remote: at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:13)
remote: at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:403:19)
remote: at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:123:22)
remote: at Socket.emit (events.js:210:5)
remote: at addChunk (_stream_readable.js:309:12)
remote: at readableAddChunk (_stream_readable.js:290:11)
remote: at Socket.Readable.push (_stream_readable.js:224:10)
remote: at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {
remote: name: 'error',
remote: length: 97,
remote: severity: 'ERROR',
remote: code: '42704',
remote: detail: undefined,
remote: hint: undefined,
remote: position: '145',
remote: internalPosition: undefined,
remote: internalQuery: undefined,
remote: where: undefined,
remote: schema: undefined,
remote: table: undefined,
remote: column: undefined,
remote: dataType: undefined,
remote: constraint: undefined,
remote: file: 'parse_type.c',
remote: line: '275',
remote: routine: 'typenameType'
remote: }
remote: Waiting for release.... failed.
To https://git.heroku.com/elooopin.git
17d0561..fd3849a master -> master
I have generated my angualr2 app using ng new project command, and now i am trying to put my project on heroku, unfortunatly, I faced with an error when i pushed my code with git push heroku master:
Counting objects: 65, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (62/62), done.
Writing objects: 100% (65/65), 363.09 KiB | 0 bytes/s, done.
Total 65 (delta 5), 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: NPM_CONFIG_PRODUCTION=true
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version (latest stable) via semver.io...
remote: Downloading and installing node 5.11.1...
remote: Using default npm version: 3.8.6
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (new runtime signature)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json)
remote:
remote: > qminder#0.0.0 postinstall /tmp/build_a0673d10d05036142a147f64099bd6fb
remote: > typings install
remote:
remote: sh: 1: typings: not found
remote:
remote: npm ERR! Linux 3.13.0-91-generic
remote: npm ERR! argv "/tmp/build_a0673d10d05036142a147f64099bd6fb/.heroku/node/bin/node" "/tmp/build_a0673d10d05036142a147f64099bd6fb/.heroku/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/build_a0673d10d05036142a147f64099bd6fb/.npmrc"
remote: npm ERR! node v5.11.1
remote: npm ERR! npm v3.8.6
remote: npm ERR! file sh
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno ENOENT
remote: npm ERR! syscall spawn
remote: npm ERR! qminder#0.0.0 postinstall: `typings install`
remote: npm ERR! spawn ENOENT
remote: npm ERR!
remote: npm ERR! Failed at the qminder#0.0.0 postinstall script 'typings install'.
remote: npm ERR! Make sure you have the latest version of node.js and npm installed.
remote: npm ERR! If you do, this is most likely a problem with the qminder package,
remote: npm ERR! not with npm itself.
remote: npm ERR! Tell the author that this fails on your system:
remote: npm ERR! typings install
remote: npm ERR! You can get information on how to open an issue for this project with:
remote: npm ERR! npm bugs qminder
remote: npm ERR! Or if that isn't available, you can get their info via:
remote: npm ERR! npm owner ls qminder
remote: npm ERR! There is likely additional logging output above.
remote:
remote: npm ERR! Please include the following file with any support request:
remote: npm ERR! /tmp/build_a0673d10d05036142a147f64099bd6fb/npm-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: - Node version not specified in package.json
remote: https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
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 easy-instagram.
remote:
To https://git.heroku.com/easy-instagram.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/easy-instagram.git'
So, is there anything that i can add to my project to fix this problem?
I have mannually added the node version to my config.json file, but it still complains with the same error:
"devDependencies": {
"angular-cli": "1.0.0-beta.10",
"codelyzer": "0.0.20",
"ember-cli-inject-live-reload": "1.4.0",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "0.13.22",
"karma-chrome-launcher": "0.2.3",
"karma-jasmine": "0.3.8",
"protractor": "3.3.0",
"ts-node": "0.5.5",
"tslint": "3.11.0",
"typescript": "1.8.10",
"typings": "1.3.1",
"node":"4.4.0"
}
Looks like Heroku doesn't install your devDependencies
There are two possible variants how to fix it:
Move typings inside dependencies:
"dependencies": {
...
"typings": "^2.1.0",
...
OR
NPM_CONFIG_PRODUCTION needs to be set to false for Heroku to install devDependencies
I'm using Codeship to deploy my Ember project to Heroku. These deployments used to work without a problem but since yesteday they fail with "npm ERR! fetch failed ..." when installing the npm dependencies in step (6). I haven't changed anything since then and resetting the dependency cache has not helped.
Anyone familiar with this issue?
I'm using:
ember-cli 3.3.12
npm v3.8.6
node v5.11.1
- ...
- (step 1) ember test
- (step 2) Exporting Heroku API Key
- (step 3) check_access_to_heroku_app my_project
- (step 4) Preparing repository for Heroku deployment
- (step 5) git remote add heroku_my_project git#heroku.com:my_project.git
- (step 6) git push heroku_tnt-ui $CI_COMMIT_ID:refs/heads/master
---- Log of Step 6 -----
Counting objects: 69, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (36/36), 6.48 KiB | 0 bytes/s, done.
Total 36 (delta 23), reused 31 (delta 19)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching set buildpack https://github.com/tonycoco/heroku-buildpack-ember-cli.git... done
remote: -----> Ember CLI app detected
remote: -----> Exporting config vars to environment
remote: -----> Building environment: production
remote:
remote: PRO TIP: Avoid using semver ranges starting with '>' in engines.node
remote: See https://devcenter.heroku.com/articles/nodejs-support
remote:
remote: -----> Requested node range: >= 0.10.0
remote: -----> Resolved node version: 5.11.1
remote: -----> Downloading and installing node
remote: -----> Using default npm version: 3.8.6
remote: -----> Downloading and installing nginx
remote: -----> Adding boot script
remote: -----> Copying configs
remote: -----> Forcing rebuild of all node_modules. Pruning all node_modules.
remote: -----> Forcing re-installation of all bower_components. Pruning all bower_components.
remote: -----> Creating node_modules cache directory
remote: -----> Creating bower_components cache directory
remote: -----> Pruning cached dependencies not specified in package.json
remote: -----> Installing dependencies
remote: npm ERR! fetch failed https://registry.npmjs.org/ember-cli-sri/-/ember-cli-sri-2.1.0.tgz
remote: npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502
remote: npm ERR! fetch failed https://registry.npmjs.org/ember-simple-auth/-/ember-simple-auth-1.1.0.tgz
remote: npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502
remote: npm ERR! fetch failed https://registry.npmjs.org/ember-cli-sri/-/ember-cli-sri-2.1.0.tgz
remote: npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502
remote: npm ERR! fetch failed https://registry.npmjs.org/ember-simple-auth/-/ember-simple-auth-1.1.0.tgz
remote: npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502
remote: npm ERR! fetch failed https://registry.npmjs.org/ember-cli-sri/-/ember-cli-sri-2.1.0.tgz
remote: npm ERR! fetch failed https://registry.npmjs.org/ember-simple-auth/-/ember-simple-auth-1.1.0.tgz
remote: npm ERR! Linux 3.13.0-91-generic
remote: npm ERR! argv "/tmp/build_aaa68782965ff56ab3bc/vendor/node/bin/node" "/tmp/build_aaa6878296554310746bc/vendor/node/bin/npm" "install" "--quiet" "--no-optional" "--userconfig" "/tmp/build_aaa6875446ff56ab3bc/.npmrc"
remote: npm ERR! node v5.11.1
remote: npm ERR! npm v3.8.6
remote:
remote: npm ERR! fetch failed with status code 502
remote: npm ERR!
remote: npm ERR! If you need help, you may report this error at:
remote: npm ERR! <https://github.com/npm/npm/issues>
remote:
remote: npm ERR! Please include the following file with any support request:
remote: npm ERR! /tmp/build_aaa687829655456ab3bc/npm-debug.log
remote: 0 info it worked if it ends with ok
remote: 1 verbose cli [ '/tmp/build_aaa68782965546ab3bc/vendor/node/bin/node',
remote: 1 verbose cli '/tmp/build_aaa687846ff56ab3bc/vendor/node/bin/npm',
remote: 1 verbose cli 'install',
remote: 1 verbose cli '--quiet',
remote: 1 verbose cli '--no-optional',
remote: 1 verbose cli '--userconfig',
remote: 1 verbose cli '/tmp/build_aaa68782b46ff56ab3bc/.npmrc' ]
remote: 2 info using npm#3.8.6
remote: 3 info using node#v5.11.1
remote: 4 verbose config Skipping project config: /tmp/build_aaa6878296f56ab3bc/.npmrc. (matches userconfig)
remote: 5 silly loadCurrentTree Starting
remote: 6 silly install loadCurrentTree
remote: 7 silly install readLocalPackageData
remote: 8 silly install normalizeTree
...
This was a bug on npm's server side and got fixed a day later.