javascript - yargs.parse error from webpack.js -


i trying install , use webpack first time. after installation made small webpack.config.js file:

  module.exports = {       context: __dirname + "/assets/js",        entry: "./react/index.js",        output: {       filename: "app.js",       path: __dirname + "/public/assets/js"   } }; 

then run webpack do:

node ./node_modules/webpack/bin/webpack.js

this gives me following error:

/var/www/html/node_modules/webpack/bin/webpack.js:152 yargs.parse(process.argv.slice(2), (err, argv, output) => {                                                     ^ syntaxerror: unexpected token >     @ module._compile (module.js:439:25)     @ object.module._extensions..js (module.js:474:10)     @ module.load (module.js:356:32)     @ function.module._load (module.js:312:12)     @ function.module.runmain (module.js:497:10)     @ startup (node.js:119:16)     @ node.js:945:3 

how fix it?

i had same problem on redhat enterprise linux. discovered if use node , npm versions downloaded https://nodejs.org, fixes problem. don't use yum or apt-get install nodejs.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -