From the react-starter-kit
, a very popular boilerplate:
This line always fails whenever I try to run or build:
plugins: ['transform-runtime', ...(DEBUG ? [] : ['transform-react-remove-prop-types', 'transform-react-constant-elements', 'transform-react-inline-elements'])]
The error:
> shin-dux@0.0.1 build /Users/justin/WebProjects/self/shin
> babel-node task/run build
/Users/justin/WebProjects/self/shin/task/webpack.config.js:68
plugins: ['transform-runtime', ...(DEBUG ? [] : ['transform-react-remove-prop-types', 'transform-react-constant-elements', 'transform-react-inline-elements'])]
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
I believe other instances of spreading work.
I have tried what I believe is the obvious set of remedies:
- Delete
node_modules
and reinstalling - Pruning
babelrc
- Using
babelrc
and not usingbabelrc
(the default is the latter in this case) - Varying
babel
presets - Voodoo
This one is driving me nuts because the repository says it builds and I trust them, but it doesn't seem to build for me.