react-native-storybook-loader icon indicating copy to clipboard operation
react-native-storybook-loader copied to clipboard

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

Open xareelee opened this issue 8 years ago • 6 comments

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?

xareelee avatar Mar 28 '17 11:03 xareelee

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 avatar Mar 30 '17 10:03 elderfo

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 avatar Apr 02 '17 00:04 elderfo

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

elderfo avatar Apr 13 '17 18:04 elderfo

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?

xareelee avatar Apr 14 '17 06:04 xareelee

Ok, I will log one and link it.

elderfo avatar Apr 16 '17 17:04 elderfo

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

BatDroid avatar Aug 21 '19 13:08 BatDroid