react-redux-starter-kit icon indicating copy to clipboard operation
react-redux-starter-kit copied to clipboard

build error : Module build failed: Error: Couldn't find preset "react" relative to directory "/Users/username/tmp"

Open darrenli2 opened this issue 8 years ago • 1 comments

I tried to build the project (npm start)and got this error

ERROR in ./src/main.js
Module build failed: Error: Couldn't find preset "react" relative to directory "/Users/username/tmp"
    at /Users/username/tmp/react-redux-starter-kit/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
    at Array.map (native)

Could anyone please help?

darrenli2 avatar May 26 '17 12:05 darrenli2

Are you working with a fresh clone of this repository or is this after a git pull? Perhaps your node_modules is borked.

cd /Users/username/tmp/react-redux-starter-kit rm -r node_modules npm install

I just did a fresh clone and it worked for me (macOS 10.12.5, node 7.6.0, npm 4.2.0)

git clone https://github.com/davezuko/react-redux-starter-kit.git cd react-redux-starter-kit npm install npm run start

matgessel avatar May 26 '17 18:05 matgessel