demo3 ERROR in ./main.jsx
youmyyou opened this issue · 2 comments
youmyyou commented
Module build failed: Error: Couldn't find preset "es2015" relative to directory
why?
ruanyf commented
Step One: If your webpack is v2.x, remove it and install v1.x.
Step Two: delete node_modules
directory under the project root and re-install dependencies.
$ npm install
youmyyou commented
thank you!
I fixed it by adding a .babelrc
file.
{ "presets": ["es2015", "react"] }