Skip to content

Instantly share code, notes, and snippets.

@kuy
Created October 4, 2016 08:13
Show Gist options
  • Save kuy/4f3afe450a0b99b8fa1a75592eea18ff to your computer and use it in GitHub Desktop.
Save kuy/4f3afe450a0b99b8fa1a75592eea18ff to your computer and use it in GitHub Desktop.
OK: es2015, NG: es2016, Why?
kuyMBA% npm test
> lifegame-redux@ test /Users/kodama/Work/lifegame-redux
> mocha --compilers js:babel-register test/unit/utils.js
/Users/kodama/Work/lifegame-redux/test/unit/utils.js:4
import * as utils from '../../src/common/utils';
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:528:28)
at loader (/Users/kodama/Work/lifegame-redux/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/kodama/Work/lifegame-redux/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at /Users/kodama/Work/lifegame-redux/node_modules/mocha/lib/mocha.js:220:27
at Array.forEach (native)
at Mocha.loadFiles (/Users/kodama/Work/lifegame-redux/node_modules/mocha/lib/mocha.js:217:14)
at Mocha.run (/Users/kodama/Work/lifegame-redux/node_modules/mocha/lib/mocha.js:485:10)
at Object.<anonymous> (/Users/kodama/Work/lifegame-redux/node_modules/mocha/bin/_mocha:457:18)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/kodama/.nodebrew/node/v6.7.0/bin/node" "/Users/kodama/.nodebrew/current/bin/npm" "run" "test"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! lifegame-redux@ test: `mocha --compilers js:babel-register test/unit/utils.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lifegame-redux@ test script 'mocha --compilers js:babel-register test/unit/utils.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the lifegame-redux package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! mocha --compilers js:babel-register test/unit/utils.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs lifegame-redux
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls lifegame-redux
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/kodama/Work/lifegame-redux/npm-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment