Errors starting quik
dmitriz opened this issue · 9 comments
$ quik
/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/src/configure.js:30
...config.plugins,
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/src/bundler.js:3:19)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
@dmitriz Hi. What's the version of NodeJS you're running? Quik needs Node 5.0 right now.
We can support older versions by using babel though. Will try to set it up over the weekend. Would love a PR if you can :)
I'm on 4.2.4 which is listed as mature.
Wouldn't have enough experience for a PR :(
@dmitriz Okay. No problem. Quik uses some ES2015 features like array spread which are not present in Node 4. I can make it work in old versions of Node by transpiling with babel (the babel-register
package). There were few issues last time I tried to do that and haven't gotten time to fix those. I'll definitely try again this weekend and get it to work with older Node versions.
@dmitriz I would recommend checking out Node Version Manager, which makes it easy as pie to change between versions.
Thanks, just tried with v5, however, it didn't install any packages and so the build failed.
In empty directory:
quik --init AwesomeProject
cd AwesomeProject && quik
Browser output:
./index.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/Users/dmitrizaitsev"
at OptionManager.mergePresets (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:327:17)
at OptionManager.mergeOptions (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:287:12)
at OptionManager.addConfig (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:221:10)
at OptionManager.findConfigs (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:364:16)
at OptionManager.init (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-core/lib/transformation/file/options/option-manager.js:412:12)
at File.initOptions (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-core/lib/transformation/file/index.js:191:75)
at new File (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-core/lib/transformation/file/index.js:122:22)
at Pipeline.transform (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-core/lib/transformation/pipeline.js:42:16)
at transpile (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-loader/index.js:14:22)
at Object.module.exports (/Users/dmitrizaitsev/npm-global/lib/node_modules/quik/node_modules/babel-loader/index.js:88:12)
There seems to be issue with the installation. Just uninstall and reinstall it once.
npm uninstall -g quik && npm install -g quik
Sorry for the trouble.
Is this because I installed running Node 4?
NVM seems to break my prefixes for Node 5...
Any details why Node 5 and what it has that Node 4 doesn't?
Node 5 uses NPM 3 by default whereas Node 4 used NPM 2. It might be because of that.
Actually I've already switched to NPM3 a while ago.
Still not sure about Node 5, until they call it "mature".