storybookjs / react-native

📓 Storybook for React Native!
https://storybook.js.org
MIT License
1.08k stars 156 forks source link

storybook requires is invalid on windows as of 8.4.x #645

Closed trajano closed 2 weeks ago

trajano commented 2 weeks ago

Describe the bug

/* do not change this file, it is auto generated by storybook. */

import { start, updateView } from "@storybook/react-native";

import "@storybookaddon-ondevice-notes\register";
import "@storybookaddon-ondevice-controls\register";
import "@storybookaddon-ondevice-actions\register";
import "@storybookaddon-ondevice-backgrounds\register";

Note the missing / and the incorrect \

trajano commented 2 weeks ago

I am thinking it's something to do with https://github.com/storybookjs/react-native/commit/467b40ba6dfec88eb77469c1d5850470fefebe55 as this changed generate.js last week

trajano commented 2 weeks ago

The patch I have corrects the common.js which fixes the generated file but not during runtime

dannyhw commented 2 weeks ago

Ah i know the problem i think, path.join is killing me

trajano commented 2 weeks ago

I couldn't find the part where you do it at runtime but just adding .posix after path should be sufficient.

dannyhw commented 2 weeks ago

If I put out a prerelease version are you able to test this easily?

dannyhw commented 2 weeks ago

@trajano can you test 8.4.2-alpha.0

dannyhw commented 2 weeks ago

should be fixed now in 8.4.2