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

Cannot use "Api" as folder name when require modules #5151

Closed
liangfenxiaodao opened this issue Jan 6, 2016 · 3 comments
Closed

Cannot use "Api" as folder name when require modules #5151

liangfenxiaodao opened this issue Jan 6, 2016 · 3 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@liangfenxiaodao
Copy link

I have a viewModel which need to do http request and an endpoint configured in Api/endpoint.js

If I use var api = require("../Api/endpoint.js"), then I will get

Unable to resolve module.. error.

But if I rename the "Api" folder to "Endpoint" or something else, the error disappears.

I'm working on iOS project.

@facebook-github-bot
Copy link
Contributor

Hey xiaodao, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

@christopherdro
Copy link
Contributor

@facebook-github-bot stack-overflow

@facebook-github-bot
Copy link
Contributor

Hey @xiaodao and thanks for posting this! @christopherdro tells me this issue looks like a question that would be best asked on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. Will close this as this is really a question that should be asked on SO.

@facebook-github-bot facebook-github-bot added For Stack Overflow Ran Commands One of our bots successfully processed a command. labels Mar 20, 2016
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants