Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 327 bytes | 0 bytes/s, done.
Total 3 (delta 2), 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_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 8.11.1
remote: engines.npm (package.json): 5.6.0
remote:
remote: Resolving node version 8.11.1...
remote: Downloading and installing node 8.11.1...
remote: npm 5.6.0 already installed with node
remote:
remote: -----> Restoring cache
remote: Loading 2 from cacheDirectories (default):
remote: - node_modules
remote: - bower_components (not cached - skipping)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json + package-lock)
remote: up to date in 4.243s
remote:
remote: -----> Caching build
remote: Clearing previous node cache
remote: Saving 2 cacheDirectories (default):
remote: - node_modules
remote: - bower_components (nothing to cache)
remote:
remote: -----> Pruning devDependencies
remote: Skipping because npm 5.6.0 sometimes fails when running 'npm
prune' due to a known issue
remote: https://github.com/npm/npm/issues/19356
remote:
remote: You can silence this warning by updating to at least npm 5.7.1 in your package.json
remote: https://devcenter.heroku.com/articles/nodejs-support#specifying-an-npm-version
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 28.5M
remote: -----> Launching...
remote: Released v6
remote: https://ashishkr.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/ashishkr.git
cfc5c8a..76b27d1 master -> master
I have also a Procfile in my project root and have like:
web: node server.js
on doing heroku config i get the following result :
MONGODB_URI: mongodb://:#ds163410.mlab.com:63410/ashishkr
i hide the username and password for the security concern but i am sure that the username and password which i have entered is absolutely correct!
in my package.json i have engines and start script also:
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"engines": {
"node": "8.11.1",
"npm": "5.6.0"
},
Anykind of help is appreciated !!
Thanks !!
Related
I tried to push my recent code to Heroku. Here is what I got in the console:
Enumerating objects: 39, done.
Counting objects: 100% (39/39), done.
Delta compression using up to 8 threads
Compressing objects: 100% (26/26), done.
Writing objects: 100% (32/32), 2.90 KiB | 593.00 KiB/s, done.
Total 32 (delta 12), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/nodejs
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): 16.14.0
remote: engines.npm (package.json): 8.3.1
remote:
remote: Resolving node version 16.14.0...
remote: Downloading and installing node 16.14.0...
remote: npm 8.3.1 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
remote:
remote: added 1403 packages, and audited 1404 packages in 28s
remote:
remote: 175 packages are looking for funding
remote: run `npm fund` for details
remote:
remote: 8 vulnerabilities (6 moderate, 2 high)
remote:
remote: To address issues that do not require attention, run:
remote: npm audit fix
remote:
remote: To address all issues (including breaking changes), run:
remote: npm audit fix --force
remote:
remote: Run `npm audit` for details.
remote:
remote: -----> Build
remote: Running build
remote:
remote: > chatapp-project#0.1.0 build
remote: > react-scripts build
remote:
remote: Could not find a required file.
remote: Name: index.js
remote: Searched in: /tmp/build_1ff4f4ff/src
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: Verifying deploy...
remote:
remote: ! Push rejected to chatapp-project-kasper.
remote:
To https://git.heroku.com/chatapp-project-kasper.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/chatapp-project-kasper.git'
It seems it is searching for a file somewhere. This is my folder structure:
https://i.stack.imgur.com/fISfz.png
I am unsure where this file is, or how I can change where heroku searches for the file. Also, in my Procfile I have this:
web: node src/App.js
Any help would be greatly appreciated.
Been trying all day to deploy this. Nothing is working. Ran through the entire node troubleshooter link, everything checks out. The where it says cant resolve module, My code is running fine on all severs and can't find the tmp folder, anywhere. I've only been coding a month. Sorry if this is stupid, but I'd appreciate some help.
Matt#DESKTOP-QFMSSDA MINGW64 ~/Desktop/momma-ecommerce (main)
$ git push heroku main
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 4 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 442 bytes | 442.00 KiB/s, done.
Total 4 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/nodejs
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_PRODUCTION=false
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): 16.13.2
remote: engines.npm (package.json): 8.1.2
remote:
remote: Resolving node version 16.13.2...
remote: Downloading and installing node 16.13.2...
remote: npm 8.1.2 already installed with node
remote:
remote: -----> Installing dependencies
remote: Installing node modules
remote:
remote: added 252 packages, and audited 253 packages in 9s
remote:
remote: 24 packages are looking for funding
remote: run `npm fund` for details
remote:
remote: found 0 vulnerabilities
remote:
remote: -----> Build
remote: Running heroku-postbuild
remote:
remote: > momma-art-sell#1.0.0 heroku-postbuild
remote: > NPM_CONFIG_PRODUCTION=false npm install --prefix frontend && npm run build --
prefix frontend
remote:
remote:
remote: added 1445 packages, and audited 1446 packages in 24s
remote:
remote: 171 packages are looking for funding
remote: run `npm fund` for details
remote:
remote: 7 moderate severity vulnerabilities
remote:
remote: To address issues that do not require attention, run:
remote: npm audit fix
remote:
remote: To address all issues (including breaking changes), run:
remote: npm audit fix --force
remote:
remote: Run `npm audit` for details.
remote:
remote: > frontend#0.1.0 build
remote: > react-scripts build
remote:
remote: Creating an optimized production build...
remote: Failed to compile.
remote:
remote: Module not found: Error: Can't resolve '../components/Message' in
'/tmp/build_4ecd4ad3/frontend/src/screens'
remote:
remote:
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: Verifying deploy...
remote:
remote: ! Push rejected to mjthomasart.
remote:
To https://git.heroku.com/mjthomasart.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/mjthomasart.git'``
when I try to push code on Heroku, the build/deploy fail because of node problem.
Console log
cd dungeon-diary
heroku buildpacks:set https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
git push heroku master
Output console with error
remote: Building source:
remote:
remote: -----> emberjs app detected
remote: -----> Setting NPM_CONFIG_PRODUCTION to false to install ember-cli toolchain
remote: -----> Fetching buildpack heroku/nodejs-v98
remote: -----> Node.js detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 10.* || >= 12
remote: engines.npm (package.json): 6.x
remote:
remote: Resolving node version 10.* || >= 12 via semver.io...
remote: Downloading and installing node 14.7.0...
remote: Unable to download node 14.7.0; does it exist?**
remote:
remote: -----> Build failed
package.json
"engines": {
"node": "10.* || >= 12"
},
The problem was...
in the log you can see, the console choose node 14.7.0 by itself,
but for Heroku it was unacceptable. So I had to explicitly write which version use ( to avoid 14.7.0 ) and it starts work :)
...weird for me why console choose the unsupported version :)
Looks like that the app was deployed :
> Counting objects: 7, done. Delta compression using up to 8 threads.
> Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7),
> 630 bytes | 0 bytes/s, done. Total 7 (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_VERBOSE=false 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
> 6.x via semver.io... remote: Downloading and installing node 6.10.2... remote: Using default npm version: 3.10.10 remote: remote: -----> Restoring cache remote: Loading 2 from
> cacheDirectories (default): remote: - node_modules remote:
> - bower_components (not cached - skipping) remote: remote: -----> Building dependencies remote: Installing node modules
> (package.json) remote: remote: -----> Caching build remote:
> Clearing previous node cache remote: Saving 2 cacheDirectories
> (default): remote: - node_modules remote: -
> bower_components (nothing to cache) remote: remote: -----> Build
> succeeded! remote: -----> Discovering process types remote:
> Procfile declares types -> (none) remote: Default types for
> buildpack -> web remote: remote: -----> Compressing... remote:
> Done: 47.8M remote: -----> Launching... remote: Released v19
> remote: https://dry-depths-33506.herokuapp.com/ deployed to
> Heroku remote: remote: Verifying deploy... done. To
> https://git.heroku.com/dry-depths-33506.git 1f1dcd3..40032c0
> master -> master
But then I receive this:
Error in Loader /app/node_modules/eslint/lib/api.js didn't return a function
# multi main
Project is cloned from existing repository and not yet modified:
https://github.com/ebdrup/html2pdf.it
I am looking for piece of information that would help me get through this simple looking yet frustrating warning/error. App cannot successfully run without phantomjs-prebuilt dependency and I am unskilled in Node.js and its project structures.
I have been researching and trying for almost 5 days now. I can manage to run the project locally through Node.js console easily.
The problem seems to be in telling the Heroku where to find the phantomjs-prebuilt file.
I have tried installing the dependency locally in the project directory with:
npm install
I have tried moving phantomjs binary manually into the bin/
I can run phantomjs on Heroku using:
heroku run phantomjs
CMD Output after building on Heroku:
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): 0.10.x
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 0.10.x via semver.io...
remote: Downloading and installing node 0.10.48...
remote: Using default npm version: 2.15.1
remote:
remote: -----> Restoring cache
remote: Loading 2 from cacheDirectories (default):
remote: - node_modules
remote: - bower_components (not cached - skipping)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json + shrinkwrap)
remote:
remote: -----> Caching build
remote: Clearing previous node cache
remote: Saving 2 cacheDirectories (default):
remote: - node_modules
remote: - bower_components (nothing to cache)
remote:
remote: -----> Build succeeded!
remote: ├── compression#1.4.0
remote: ├── express#4.11.2
remote: ├── morgan#1.5.1
remote: ├── node-uuid#1.4.2
remote: ├── UNMET DEPENDENCY phantomjs-prebuilt#^2.1.4
remote: ├── request#2.53.0
remote: └── slugify-url#1.2.0
remote:
remote: ! Unmet dependencies don't fail npm install but may cause runtime issues
remote: https://github.com/npm/npm/issues/7494
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> web
remote:
remote: -----> Compressing...
remote: Done: 32.9M
remote: -----> Launching...
remote: Released v5
remote: https://h2ptest.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/h2ptest.git
b278f4b..bce77f9 master -> master
package.json:
"engines": {
"node": "0.10.x"
},
"main": "./lib/app.js",
"dependencies": {
"compression": "^1.1.0",
"express": "",
"morgan": "^1.3.1",
"node-uuid": "",
"phantomjs-prebuilt": "^2.1.14",
"request": "",
"slugify-url": ""
},
"devDependencies": {
"mocha": "",
"chai": "",
"sinon": "",
"sinon-chai": "",
"underscore": "",
"mocha-jshint": "",
"open": ""
},
"scripts": {
"start": "node ./lib/app.js",
"test": "_mocha"
},
"directories": {
"test": "test"
},