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

Unable to resolve module '...' from 'storyLoader.js' #23

Open
xareelee opened this issue Mar 28, 2017 · 6 comments
Open

Unable to resolve module '...' from 'storyLoader.js' #23

xareelee opened this issue Mar 28, 2017 · 6 comments

Comments

@xareelee
Copy link

xareelee commented Mar 28, 2017

I think it is not react-native-storybook-loader's problem, but I think you may provide some information about this issue.

I put the .stories.js file under a __tests__ folder and refreshed the storyLoader.js generated by react-native-storybook-loader, then it shows an error:

I put the same file in a non-__tests__ folder and refreshed the storyLoader.js again, then it goes well.

// storyLoader.js
require('./../src/ofo_api/__tests__/API.stories.js'); // error
require('./../src/ofo_api//API.stories.js');  // good

I did not find any clue about this issue. Do you know why?

@elderfo
Copy link
Owner

elderfo commented Mar 30, 2017

Sorry I haven't been able to look into this yet. I should be able to check out this and the other issue you logged this weekend.

@elderfo
Copy link
Owner

elderfo commented Apr 2, 2017

It appears __tests__ folders are excluded by the React Native packager. It looks to be hard coded.

I also verified by creating a new React Native project and creating a component in a __tests__ folder and got the same error.

I suggest logging an issue/feature request on the React Native project (feel free to reference this issue so we can track progress). I do think this is a legitimate use case.

@elderfo
Copy link
Owner

elderfo commented Apr 13, 2017

@xareelee, did you open an issue with the React Native team? If so, can you link it here?

@xareelee
Copy link
Author

Nope, I did not. I'm not sure how to describe this issue in the React Native repo.

How about that you report this issue there?

@elderfo
Copy link
Owner

elderfo commented Apr 16, 2017

Ok, I will log one and link it.

@BatDroid
Copy link

@elderfo still have the issue. how did it go with the report?

michaelbayday pushed a commit to michaelbayday/react-native-storybook-loader that referenced this issue Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants