agrcrobles / react-native-web-boilerplate

I am no longer in maintenance
71 stars 11 forks source link

Error: Couldn't find preset "react-natve" relative to directory #4

Closed lyahdav closed 7 years ago

lyahdav commented 7 years ago

I cloned the repo, ran npm install and then npm start and I get this error:

ERROR in ./index.js
Module build failed: Error: Couldn't find preset "react-natve" relative to directory ...

This is apparently the same error that comes from the motivation for this repo so I'm a bit confused.

I did have to change the package.json slightly. I changed the babel-preset-stage-1 dependency version to: "babel-preset-stage-1": "6.13.0"

It couldn't find the original babel-preset-stage-1 version that was in the package.json.

lyahdav commented 7 years ago

Turns out there was a typo in the .babelrc file. react-natve instead of react-native. Turns out react-native isn't even needed in the .babelrc. I must have added it for some reason thinking it was needed. Oops.

surenderkhowal commented 5 years ago

Check in your package.json file there react-native installed correctly or not. You can also create .babelrc file in root of you project with following content:

{ "presets": ["react-native"] }