cli: "Unexpected token import" when using symlinks
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? 😐
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 16 (8 by maintainers)
Ok I’ll give that a go.
On Mon, 12 Mar 2018, 21:19 Alexander-Taran, notifications@github.com wrote: