Client build fails
maxkueng opened this issue · 2 comments
maxkueng commented
Hi. npm run client:build
fails with the following error:
> gunstore@1.0.1 client:build /home/max/play/gunstore.io
> webpack
Hash: 8f3d7d29289b2e922bac
Version: webpack 3.11.0
Time: 211ms
Asset Size Chunks Chunk Names
bundle.js 3.27 kB 0 [emitted] main
favicon.png 5.98 kB [emitted]
css/main.css 2.44 kB [emitted]
index.html 929 bytes [emitted]
[0] multi ./client/src/index.js 28 bytes {0} [built]
[1] ./client/src/index.js 680 bytes {0} [built] [failed] [1 error]
ERROR in ./client/src/index.js
Module build failed: SyntaxError: Unexpected token (5:16)
3 | import App from './components/app';
4 |
> 5 | ReactDOM.render(<App />, document.getElementById("app"));
| ^
@ multi ./client/src/index.js
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! gunstore@1.0.1 client:build: `webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the gunstore@1.0.1 client:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Is it possible that the .babelrc
is missing?
genderev commented
I have the same exact error right now.
i001962 commented
Same error. This got me unstuck
npm install --save-dev babel-plugin-transform-class-properties
Then creating file
.babelrc
with these entries:
{
"presets": [
["es2015"],
"react"
],
"plugins": [
"babel-plugin-transform-class-properties"
]
}