aurelia / aurelia/cli

"Unexpected token import" when using symlinks

Open
#830 16 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
402
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a bug report**

* **Library Version:**
CLI: 0.32.0

**Please tell us about your environment:**
* **Operating System:**
Windows 10 Pro

* **Node Version:**
9.5.0

* **NPM Version:**
5.6.0

* **Browser:**
N/A

* **Language:**
ESNext

* **Loader/bundler:**
SystemJS and RequireJS

**Current behavior:**
`au new --here` does it's thing. After installing dependencies, I run `au build`, and get the error:

```
(function (exports, require, module, __filename, __dirname) { import gulp from 'gulp';
^^^^^^

SyntaxError: Unexpected token import
at new Script (vm.js:51:7)
at createScript (vm.js:138:10)
at Object.runInThisContext (vm.js:199:10)
at Module._compile (module.js:624:28)
at Module._extensions..js (module.js:671:10)
at Object.require.extensions.(anonymous function) [as .js] (d:\code\scratch\meh\node_modules\babel-register\lib\node.js:152:7)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)

```

I have just recently reformatted my machine, this is a fresh box with everything installed first time.

I have a .babelrc file (put there by the CLI):
```
{
"sourceMap": true,
"sourceRoot": "src",
"moduleIds": false,
"comments": false,
"compact": false,
"code": true,
"presets": [
["es2015", {"loose": true}],
"stage-1"
],
"plugins": [
"syntax-flow",
"transform-decorators-legacy",
"transform-flow-strip-types"
]
}
```

* **What is the expected behavior?**
I'd like it to build!

* **What is the motivation / use case for changing the behavior?**
:|

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.