Closed nha closed 9 years ago
I am not sure if I understand it right, but graffiti-mongoose is transpiled to ES5
, if you install it using npm
, it shouldn't be a problem.
You understood right. Is there a way for me to get rid of that error ?
/node_modules/@risingstack/graffiti/src/koa/index.js:14
return function *(next) {
^
SyntaxError: Unexpected token *
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Module._extensions..js (module.js:478:10)
It looks like it should be possible using babel-node
arguments, but I am fuzzy on the details and asked a question there : http://stackoverflow.com/questions/33174008/babel-node-not-ignore-some-node-modules
@nha hi it's a generator function. You don't need babel for that just use the latest Node.js: 4.x.x
@hekike Ah thanks let me try that.
Alright it seems to solve the issue (I have another one related to gyp-rebuild and probably osx but it seems unrelated so I will close this issue). Thanks @hekike.
@nha ok, sure! Probably you need to update some of your packages and I also recommend to remove node_modules
folder and npm install
it again because the updated node-gyp
. More info here: https://nodejs.org/en/blog/weekly-updates/weekly-update.2015-09-04/
I am already using babel-node programmatically in my project. But babel-node doesn't go through node_modules. If I instruct it to do so, then it fails on an express middleware ("static is a reserved keyword"). It would make it easier to not require the use of
babel
in the npm package.