ivan-kleshnin / cyclejs-examples

CycleJS examples
121 stars 9 forks source link

Error on runing npm run build #12

Closed tnedich closed 9 years ago

tnedich commented 9 years ago

λ npm run build

cyclejs-examples@2.0.0 build C:\Users\Admin\Desktop\RxJS\CYCLE-FRAMEWORK\cyclejs-examples-master webpack --config webpack.config-prod.js --progress --colors

C:\Users\Admin\Desktop\RxJS\CYCLE-FRAMEWORK\cyclejs-examples-master\webpack.config-prod.js:2 import Path from "path"; ^^^^^^ SyntaxError: Unexpected reserved word at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:427:25) at Object.Module._extensions..js (module.js:462:10) at Module.load (module.js:339:32) at Function.Module._load (module.js:294:12) at Module.require (module.js:349:17) at require (module.js:368:17) at module.exports (C:\Users\Admin\Desktop\RxJS\CYCLE-FRAMEWORK\cyclejs-examples-master\node_modules\webpack\bin\convert-argv.js:56:13) at Object. (C:\Users\Admin\Desktop\RxJS\CYCLE-FRAMEWORK\cyclejs-examples-master\node_modules\webpack\bin\webpack.js:54:40) at Module._compile (module.js:444:26)

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\iojs\node.exe" "C:\Program Files\iojs\node_modules\npm\bin\npm-cli.js" "run" "build" npm ERR! node v1.5.0 npm ERR! npm v2.7.0 npm ERR! code ELIFECYCLE npm ERR! cyclejs-examples@2.0.0 build: webpack --config webpack.config-prod.js --progress --colors npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the cyclejs-examples@2.0.0 build script 'webpack --config webpack.config-prod.js --progress --colors'. npm ERR! This is most likely a problem with the cyclejs-examples package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! webpack --config webpack.config-prod.js --progress --colors npm ERR! You can get their info via: npm ERR! npm owner ls cyclejs-examples npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Admin\Desktop\RxJS\CYCLE-FRAMEWORK\cyclejs-examples-master\npm-debug.log

ivan-kleshnin commented 9 years ago

https://github.com/ivan-kleshnin/cyclejs-examples#install

Did you miss bin/install command from there? As all modules are in ES6 syntax you need to tweak the executables with the babel-node shebang.

tnedich commented 9 years ago

Same after runing bin/install :(

ivan-kleshnin commented 9 years ago

Argh, that's Windows specific. Unfortunately I hever had time to investigate how to make it crossplatform.

Basically, you need to replace what is in bin/install by something that will do the same stuff in Windows. As Windows has no native shebang support you probably should replace extension handler for .js files from node to babel-node on global system level. I don't think there will be undesired consequences for anything else as babel-node is node just with ES6 syntax preparsers enabled.

Unfortunately, I can't tell you exact commands you should input because I don't have Windows by hand. And I should warn you, if you just begin with Node, it won't be your last trouble. Many things here are UNIX-only. That's how it is :disappointed:

tnedich commented 9 years ago

For now I will test it on my Ubuntu installation. Windows don't play well with developers, and that a fact. Thank you for your time and for nice examples. Code is valuable :)

ivan-kleshnin commented 9 years ago

Thank you for the kind words. Feel free to ask again if you will find any other obstacles.