I have a Node project that I want to host on Heroku. I explicitly defined the Node and npm versions in my package.json (located in the root directory), which looks like this:
{ "name": "*********", "version": "0.0.0", "private": true, "engines": { "node": "0.12.x", "npm": "2.5.x" }, "scripts": { "start": "node ./bin/www" }, "dependencies": { "body-parser": "^1.13.3", ... }
However, when I try to press the application on heroku
git push heroku master
Heroku is trying to build an application, but it seems it cannot use the version of Node and npm. Here is the answer I get.
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 4.2.1... remote: Using default npm version: 2.14.7
Why doesn't the hero read the version of Node and npm from package.json?
nusic
source share