jods4/aurelia-webpack-build

Error when running webpack

gregoryagu opened this issue · 2 comments

I am trying to get the aspnetcore sample to work.

When I run "webpack" on the command line, it gives me this message:

"Unexpected token" and points to the first brace in this line:

const { AureliaPlugin } = require("aurelia-webpack-plugin");

If I remove the braces, it does not give this error, but it then gives an error on this line and points to the "=" in AureliaPrlugin.js:

constructor(options = {}) {

I also tried downloading and running webpack on the super-minimal-aurelia project, but it gives the same error.

As far as I know, I am running the latest webpack 2.0. When I run webpack =v, it tells me I am using 2.2.1

Suggestions?

jods4 commented

You need a release of NodeJS that supports ES6, basically Node >= 6.

Thank you, that resolved it.