Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on build #22

Closed
danielbm opened this issue Jul 9, 2016 · 20 comments
Closed

Error on build #22

danielbm opened this issue Jul 9, 2016 · 20 comments

Comments

@danielbm
Copy link

danielbm commented Jul 9, 2016

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
Copy link
Collaborator

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
Copy link
Contributor

any idea of when this can be fixed?

@larryranches
Copy link
Contributor

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
Copy link
Collaborator

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
Copy link
Collaborator

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

@danielbm
Copy link
Author

Thanks @niftylettuce and @slayrbear !

@luisfuertes
Copy link

luisfuertes commented Jul 12, 2016

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

@niftylettuce niftylettuce reopened this Jul 12, 2016
@deju
Copy link

deju commented Jul 13, 2016

@slayrbear It works for me.

@larryranches
Copy link
Contributor

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
Copy link

Some news?

@faizan-tariq-confiz
Copy link

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
Copy link

munzur commented Jul 25, 2016

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

i think this will solve your problem.

@faizan-tariq-confiz
Copy link

I have already tried this, and its not working

@ivpusic
Copy link
Contributor

ivpusic commented Jul 26, 2016

+1

@luisfuertes
Copy link

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
Copy link

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

Regards

@niftylettuce
Copy link
Collaborator

Taking a look here..

@niftylettuce
Copy link
Collaborator

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

@niftylettuce
Copy link
Collaborator

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
Copy link
Collaborator

screen shot 2016-07-31 at 1 58 47 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants