odoe / jsapi-webpack

Sample using the webpack plugin with babel
20 stars 10 forks source link

Failed to execute "npm run build" #3

Closed vannizhang closed 6 years ago

vannizhang commented 6 years ago

Failed to execute npm run build, here is the error message that I got:

C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\@arcgis\webpack-plugin\index.js:48
    this.options = { ...this.options, ...options, ...options.options };
                     ^^^

SyntaxError: Unexpected token ...
    at NativeCompileCache._moduleCompile (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\v8-compile-cache\v8-compile-cache.js:226:18)
    at Module._compile (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\v8-compile-cache\v8-compile-cache.js:172:36)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
    at Object.<anonymous> (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\webpack.config.js:1:84)
    at Module._compile (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
    at WEBPACK_OPTIONS (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\webpack-cli\bin\convert-argv.js:133:13)
    at requireConfig (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\webpack-cli\bin\convert-argv.js:135:6)
    at C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\webpack-cli\bin\convert-argv.js:142:17
    at Array.forEach (native)
    at module.exports (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\webpack-cli\bin\convert-argv.js:140:15)
    at yargs.parse.err (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\webpack-cli\bin\webpack.js:240:39)
    at Object.parse (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\webpack-cli\node_modules\yargs\yargs.js:552:18)
    at C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\webpack-cli\bin\webpack.js:218:8
    at Object.<anonymous> (C:\xampp\htdocs\arcgis-sandbox\jsapi-webpack\node_modules\webpack-cli\bin\webpack.js:515:3)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
odoe commented 6 years ago

You might need to update your version of node. I'm running 8.9.3 for reference.

vannizhang commented 6 years ago

@odoe upgrading my node to the latest version did solve the issue. Thanks!