ladjs / react-native-loading-spinner-overlay

:barber: React Native loading spinner overlay
MIT License
1.59k stars 173 forks source link

Error on build #22

Closed danielbm closed 8 years ago

danielbm commented 8 years ago

Hi. I am getting this error, which seems related to #20

/home/daniel/memox/memox/memoxnative/node_modules/promise/lib/done.js:10 throw err; ^ Error: Couldn't find preset "react-native-stage-0" relative to directory "/home/daniel/memox/memox/memoxnative/node_modules/react-native-loading-spinner-overlay" at /home/daniel/memox/memox/memoxnative/node_modules/babel-core/lib/transformation/file/options/option-manager.js:395:17 at Array.map (native) at OptionManager.resolvePresets (/home/daniel/memox/memox/memoxnative/node_modules/babel-core/lib/transformation/file/options/option-manager.js:387:20) at OptionManager.mergePresets (/home/daniel/memox/memox/memoxnative/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:10) at OptionManager.mergeOptions (/home/daniel/memox/memox/memoxnative/node_modules/babel-core/lib/transformation/file/options/option-manager.js:330:14) at OptionManager.addConfig (/home/daniel/memox/memox/memoxnative/node_modules/babel-core/lib/transformation/file/options/option-manager.js:232:10) at OptionManager.findConfigs (/home/daniel/memox/memox/memoxnative/node_modules/babel-core/lib/transformation/file/options/option-manager.js:436:16) at OptionManager.init (/home/daniel/memox/memox/memoxnative/node_modules/babel-core/lib/transformation/file/options/option-manager.js:484:12) at File.initOptions (/home/daniel/memox/memox/memoxnative/node_modules/babel-core/lib/transformation/file/index.js:223:65) TransformError: /home/daniel/memox/memox/memoxnative/node_modules/react-native-loading-spinner-overlay/src/index.js: Couldn't find preset "react-native-stage-0" relative to directory "/home/daniel/memox/memox/memoxnative/node_modules/react-native-loading-spinner-overlay" :app:bundleReleaseJsAndAssets FAILED

I am using react native 0.28.0, and react-native-loading-spinner-overlay 0.2.2.

Apparently the fix for #20 did not work for me. Am I doing something wrong?

niftylettuce commented 8 years ago

Sorry, we need to put babel-preset-stage-0 in dependencies I believe. In the meanwhile, you can simply do npm i --save-dev babel-preset-stage-0 to fix this.

larryranches commented 8 years ago

any idea of when this can be fixed?

larryranches commented 8 years ago

For a temporary fix for this issue in your React Native project, you actually want to run the command npm install babel-preset-react-native-stage-0 --save and add .babelrc file your root project directory with { "presets": ["react-native-stage-0"] }

More information here https://github.com/skevy/babel-preset-react-native-stage-0.

niftylettuce commented 8 years ago

What is the preferred approach here? I was given the suggestion to not compile out a lib folder from the src directory, but I'm really not sure how to support the community without doing so. Should I remove the .babelrc file? Is it even needed?

niftylettuce commented 8 years ago

See release v0.2.3 on NPM, npm i --save react-native-loading-spinner-overlay@0.2.3. Thank you!

danielbm commented 8 years ago

Thanks @niftylettuce and @slayrbear !

luisfuertes commented 8 years ago

@niftylettuce I have the v0.2.3 and react-native v0.28.0 and same error.

deju commented 8 years ago

@slayrbear It works for me.

larryranches commented 8 years ago

Very weird. It was working for me, now it's not.

@deju Can you confirm if this is working for you once more? Make sure you restart the package manager, etc and try again.

@niftylettuce Any ideas to permanently fix this? My commit should have gotten the error fix by adding babel-preset-react-native-stage-0 as a dev dependency to the package.

Anyways, the temporary fix I mentioned earlier in this thread will fix this in your RN project.

luisfuertes commented 8 years ago

Some news?

faizan-tariq-confiz commented 8 years ago

I am getting the same error. Used npm i --save react-native-loading-spinner-overlay@0.2.3 and .babelrc file already exists Any suggestion to resolve this issue????

munzur commented 8 years ago

@faizan-tariq-confiz npm i babel-preset-react-native-stage-0 --save-dev

i think this will solve your problem.

faizan-tariq-confiz commented 8 years ago

I have already tried this, and its not working

ivpusic commented 8 years ago

+1

luisfuertes commented 8 years ago

I did @slayrbear response and fixed it:

For a temporary fix for this issue in your React Native project, you actually want to run the command npm install babel-preset-react-native-stage-0 --save and add .babelrc file your root project directory with { "presets": ["react-native-stage-0"] }

More information here https://github.com/skevy/babel-preset-react-native-stage-0.
tuxtux00 commented 8 years ago

Hi there, Will a permanent fix come for this issue?

Regards

niftylettuce commented 8 years ago

Taking a look here..

niftylettuce commented 8 years ago

See release v0.3.0, install with npm i --save react-native-loading-spinner-overlay.

niftylettuce commented 8 years ago

I just tested this out on latest version of React Native and also took this screenshot showing this is now working as of v0.3.0 without any extra steps needed. Sorry about that guys, I had been distracted with another more prioritized project. If someone wants to have collaborator status on here and NPM for future updates, I would gladly share it. Thank you for reporting the issue @danielbm

niftylettuce commented 8 years ago
screen shot 2016-07-31 at 1 58 47 pm