Error when running npm start with babel-node
See original GitHub issueWhen i run the babel-node enabled package.json file I receive an error. Output from npm-debug.log below:
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using npm@3.10.10 3 info using node@v6.11.3 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle javascript-development-environment@1.0.0~prestart: javascript-development-environment@1.0.0 6 verbose lifecycle javascript-development-environment@1.0.0~prestart: unsafe-perm in lifecycle true 7 verbose lifecycle javascript-development-environment@1.0.0~prestart: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/[username]/Documents/MIM Practice/js-dev-env/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 8 verbose lifecycle javascript-development-environment@1.0.0~prestart: CWD: /Users/[username]/Documents/MIM Practice/js-dev-env 9 silly lifecycle javascript-development-environment@1.0.0~prestart: Args: [ '-c', 'babel-node buildScripts/startMessage.js' ] 10 silly lifecycle javascript-development-environment@1.0.0~prestart: Returned: code: 1 signal: null 11 info lifecycle javascript-development-environment@1.0.0~prestart: Failed to exec prestart script 12 verbose stack Error: javascript-development-environment@1.0.0 prestart:
babel-node buildScripts/startMessage.js12 verbose stack Exit status 1 12 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16) 12 verbose stack at emitTwo (events.js:106:13) 12 verbose stack at EventEmitter.emit (events.js:191:7) 12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14) 12 verbose stack at emitTwo (events.js:106:13) 12 verbose stack at ChildProcess.emit (events.js:191:7) 12 verbose stack at maybeClose (internal/child_process.js:920:16) 12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 13 verbose pkgid javascript-development-environment@1.0.0 14 verbose cwd /Users/[username]/Documents/MIM Practice/js-dev-env 15 error Darwin 17.0.0 16 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 17 error node v6.11.3 18 error npm v3.10.10 19 error code ELIFECYCLE 20 error javascript-development-environment@1.0.0 prestart:
babel-node buildScripts/startMessage.js20 error Exit status 1 21 error Failed at the javascript-development-environment@1.0.0 prestart script 'babel-node buildScripts/startMessage.js'. 21 error Make sure you have the latest version of node.js and npm installed. 21 error If you do, this is most likely a problem with the javascript-development-environment package, 21 error not with npm itself. 21 error Tell the author that this fails on your system: 21 error babel-node buildScripts/startMessage.js 21 error You can get information on how to open an issue for this project with: 21 error npm bugs javascript-development-environment 21 error Or if that isn't available, you can get their info via: 21 error npm owner ls javascript-development-environment 21 error There is likely additional logging output above. 22 verbose exit [ 1, true ]
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
The issue is with .babelrc When I changed it to babel-recommended
it worked just fine.
This worked for me though I had to replace
"env"
with"@babel/env"