Reputation: 522
I often get this error when changing things in my react-native project.
17:27:35: Failed building JavaScript bundle
17:27:42: Warning: 'react' peer dependency missing. Run `npm ls` in /Users/navalsaini/hf/nativeapp to see full warning.
17:27:42:
17:27:42: If there is an issue running your project, please run `npm install` in /Users/navalsaini/hf/nativeapp and restart.
Building JavaScript bundle [========================================================================================= ] 99
Additionally when I run an eslint, I dont get any issues. (The ones blow are not entirely related to my code and I get them anyway - even when the project works)
/Users/navalsaini/hf/nativeapp/src/platforms/native/utils/fbAuth.js
7:33 error 'Expo' is not defined no-undef
✖ 1 problems (1 errors, 0 warnings)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `eslint . --fix`
Is there a better way to configure my expo build system?
My eslintrc looks as below.
cat .eslintrc.json
{
"extends": "expo/native",
"rules": {
"react/jsx-no-bind": [false]
}
}
This is important because it is a huge waste of my time.
Upvotes: 0
Views: 719
Reputation: 522
I have realised that if I want to know the exact build error, this is what works for me.
stash
and go to last working commitThe build
errors are dumped on simulator screen with a red background.
This does save me time as compared to tracing which change made the build break.
Upvotes: 2