question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

au new --here using webpack `Unexpected token )`

See original GitHub issue

I’m submitting a bug report

  • CLI Version: 0.31.2

Please tell us about your environment:

  • Operating System: Windows 10

Current behavior: Using au new --here and choosing the following options fails

  1. Webpack,
  2. Web,
  3. Typescript,
  4. Default,
  5. Less
  6. None,
  7. No,
  8. Visual Studio Code
ERROR [ProjectCreation] Failed to create the project due to an error: Unexpected token )
INFO [ProjectCreation] C:\Users\user\AppData\Roaming\npm\node_modules\aurelia-cli\lib\commands\new\buildsystems\webpack\index.js:41
  ).addToContent(
  ^
SyntaxError: Unexpected token )
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    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 (internal/module.js:20:19)
    at ui.clearScreen.then.then.then.answer (C:\Users\user\AppData\Roaming\npm\node_modules\aurelia-cli\lib\workflow\activities\project-create.js:47:30)

Fix There is a stray comma on line 40 that is causing this to fail, i removed it and reran the steps and it all works.

https://github.com/aurelia/cli/blob/053ad98d9dad05ba16de861e57f010d863107d96/lib/commands/new/buildsystems/webpack/index.js#L40

ProjectItem.resource('environment.ext', 'tasks/environment.ext', project.model.transpiler),<--HERE 
.addToContent(

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
4imblecommented, Aug 25, 2017

No worries, it’s not a blocker for me as I edited the file locally. Thought it best I report it in case it was unknown. 👍

0reactions
JeroenVinkecommented, Aug 28, 2017

Released as 0.32.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught SyntaxError: Unexpected token < #205 - GitHub
Hello, I'm using a package called "connect-history-api-fallback" in order to allow for html5 pushState with webpack-dev-middleware.
Read more >
Babel 6: Module parse failed: Unexpected token (ref is a ...
1 Answer 1 ... This is not related to webpack. You simply need to remove one parenthesis ( from the function definition. Also,...
Read more >
How I resolved issues while setting up Jest and Enzyme in a ...
Jest encountered an unexpected token. This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not...
Read more >
SyntaxError: unknown: Unexpected token (import) : r/webpack
When I apply the extract-loader to an HTML file that depends on a CSS and JS file, webpack seems to be unable to...
Read more >
"[webpack] 'dist': web-part.js from UglifyJs Unexpected token ...
js from UglifyJs Unexpected token: name". The reason was the web part was using ES6 code for managing the array objects and UglifyJs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found