node.js - package.json start script, babel-node: not found on heroku deploy -
when run heroku local
or when npm start
locally, app builds , runs fine. when deploy heroku, app crashes saying cannot find babel-node.
here log output:
2016-04-21t22:20:44.320025+00:00 heroku[api]: deploy 5d9a9da eagsalazar@gmail.com 2016-04-21t22:20:44.320084+00:00 heroku[api]: release v9 created eagsalazar@gmail.com 2016-04-21t22:20:44.542062+00:00 heroku[slug-compiler]: slug compilation started 2016-04-21t22:20:44.542069+00:00 heroku[slug-compiler]: slug compilation finished 2016-04-21t22:20:44.501025+00:00 heroku[web.1]: state changed crashed starting 2016-04-21t22:20:46.278065+00:00 heroku[web.1]: starting process command `npm start` 2016-04-21t22:20:50.467407+00:00 app[web.1]: 2016-04-21t22:20:50.467434+00:00 app[web.1]: > qc-server@1.0.0 start /app 2016-04-21t22:20:50.467435+00:00 app[web.1]: > babel-node index.js 2016-04-21t22:20:50.467436+00:00 app[web.1]: 2016-04-21t22:20:50.479490+00:00 app[web.1]: sh: 1: babel-node: not found 2016-04-21t22:20:50.521936+00:00 app[web.1]: 2016-04-21t22:20:50.538822+00:00 app[web.1]: npm err! linux 3.13.0-79-generic 2016-04-21t22:20:50.539334+00:00 app[web.1]: npm err! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 2016-04-21t22:20:50.539595+00:00 app[web.1]: npm err! node v5.10.1 2016-04-21t22:20:50.555119+00:00 app[web.1]: npm err! npm v3.8.3 2016-04-21t22:20:50.555339+00:00 app[web.1]: npm err! file sh 2016-04-21t22:20:50.555549+00:00 app[web.1]: npm err! code elifecycle 2016-04-21t22:20:50.555769+00:00 app[web.1]: npm err! errno enoent 2016-04-21t22:20:50.555965+00:00 app[web.1]: npm err! syscall spawn 2016-04-21t22:20:50.556142+00:00 app[web.1]: npm err! qc-server@1.0.0 start: `babel-node index.js` 2016-04-21t22:20:50.556305+00:00 app[web.1]: npm err! spawn enoent 2016-04-21t22:20:50.556488+00:00 app[web.1]: npm err! 2016-04-21t22:20:50.556666+00:00 app[web.1]: npm err! failed @ qc-server@1.0.0 start script 'babel-node index.js'. 2016-04-21t22:20:50.556854+00:00 app[web.1]: npm err! make sure have latest version of node.js , npm installed. 2016-04-21t22:20:50.557017+00:00 app[web.1]: npm err! if do, problem qc-server package, 2016-04-21t22:20:50.557175+00:00 app[web.1]: npm err! not npm itself. 2016-04-21t22:20:50.557343+00:00 app[web.1]: npm err! tell author fails on system: 2016-04-21t22:20:50.557564+00:00 app[web.1]: npm err! babel-node index.js 2016-04-21t22:20:50.557741+00:00 app[web.1]: npm err! can information on how open issue project with: 2016-04-21t22:20:50.557916+00:00 app[web.1]: npm err! npm bugs qc-server 2016-04-21t22:20:50.558110+00:00 app[web.1]: npm err! or if isn't available, can info via: 2016-04-21t22:20:50.558306+00:00 app[web.1]: npm err! npm owner ls qc-server 2016-04-21t22:20:50.558492+00:00 app[web.1]: npm err! there additional logging output above. 2016-04-21t22:20:50.563859+00:00 app[web.1]: 2016-04-21t22:20:50.567790+00:00 app[web.1]: npm err! please include following file support request: 2016-04-21t22:20:50.568004+00:00 app[web.1]: npm err! /app/npm-debug.log 2016-04-21t22:20:51.824822+00:00 heroku[web.1]: state changed starting crashed 2016-04-21t22:20:51.808246+00:00 heroku[web.1]: process exited status 1
my package.json:
{ "name": "qc-server", "version": "1.0.0", "description": "xxxx", "main": "index.js", "scripts": { "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js 'test/**/*.js'", "test:watch": "npm run test -- --watch -g", "start": "babel-node index.js" }, "babel": { "presets": [ "es2015" ] }, "keywords": [], "author": "", "license": "isc", "devdependencies": { "babel-cli": "^6.6.0", "babel-core": "^6.6.0", "babel-eslint": "^5.0.0", "babel-preset-es2015": "^6.6.0", "chai": "^3.5.0", "chai-immutable": "^1.5.3", "eslint": "^2.2.0", "eslint-config-airbnb": "^6.0.2", "eslint-plugin-react": "^4.1.0", "mocha": "^2.4.5" }, "dependencies": { "express": "^4.13.4", "immutable": "^3.7.6", "node-uuid": "^1.4.7", "redux": "^3.3.1", "socket.io": "^1.4.5" } }
anyone have suggestions?
you have include dependency in package.json install when deploy.
$ npm install babel-cli -s
than have change start
command like:
"start": "babel-node index.js"
see here more info on deploying babel on heroku.com.
warning: using babel-node not recommended in production
Comments
Post a Comment