When launching react-native server with yarn start, after reloading the app on the mobile device I get an error message saying that it can't import /register.
Steps to reproduce the behavior
Set up Storybook 8.3.3 in an existing react-native project.
Add @storybook/addon-react-native-server
run yarn start
reload app
Expected behavior
A websocket server is started in the configured port (7007).
Screenshots and/or logs
yarn start
info Welcome to React Native v0.75
info Starting dev server on port 8081...
▒▒▓▓▓▓▒▒
▒▓▓▓▒▒░░▒▒▓▓▓▒
▒▓▓▓▓░░░▒▒▒▒░░░▓▓▓▓▒
▓▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓
▓▓░░░░░▒▓▓▓▓▓▓▒░░░░░▓▓
▓▓░░▓▓▒░░░▒▒░░░▒▓▒░░▓▓
▓▓░░▓▓▓▓▓▒▒▒▒▓▓▓▓▒░░▓▓
▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░▓▓
▓▓▒░░▒▒▓▓▓▓▓▓▓▓▒░░░▒▓▓
▒▓▓▓▒░░░▒▓▓▒░░░▒▓▓▓▒
▒▓▓▓▒░░░░▒▓▓▓▒
▒▒▓▓▓▓▒▒
Welcome to Metro v0.80.5
Fast - Scalable - Integrated
info Dev server ready
i - run on iOS
a - run on Android
d - open Dev Menu
r - reload app
BUNDLE ./index.js
error: Error: Unable to resolve module @storybook/addon-react-native-server/register from /Users/gus/app/mobile/.storybook/storybook.requires.ts: @storybook/addon-react-native-server/register could not be found within the project or in these directories:
node_modules
9 | import "@storybook/addon-ondevice-controls/register";
10 | import "@storybook/addon-ondevice-actions/register";
> 11 | import "@storybook/addon-react-native-server/register";
| ^
12 |
13 | const normalizedStories = [
14 | {
at ModuleResolver.resolveDependency (/Users/gus/app/mobile/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:153:15)
at DependencyGraph.resolveDependency (/Users/gus/app/mobile/node_modules/metro/src/node-haste/DependencyGraph.js:271:43)
at /Users/gus/app/mobile/node_modules/metro/src/lib/transformHelpers.js:176:21
at resolveDependencies (/Users/gus/app/mobile/node_modules/metro/src/DeltaBundler/buildSubgraph.js:56:25)
at visit (/Users/gus/app/mobile/node_modules/metro/src/DeltaBundler/buildSubgraph.js:107:30)
at async Promise.all (index 2)
at async visit (/Users/gus/app/mobile/node_modules/metro/src/DeltaBundler/buildSubgraph.js:116:5)
at async Promise.all (index 7)
at async visit (/Users/gus/app/mobile/node_modules/metro/src/DeltaBundler/buildSubgraph.js:116:5)
at async Promise.all (index 2)
Describe the bug
When launching react-native server with
yarn start
, after reloading the app on the mobile device I get an error message saying that it can't import/register
.Steps to reproduce the behavior
@storybook/addon-react-native-server
yarn start
Expected behavior
A websocket server is started in the configured port (7007).
Screenshots and/or logs
Environment
Additional context
Tried with
0.0.5
and same error.