question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couldn't find preset "functional-hmr" relative to directory "MyApp/storybook"

See original GitHub issue

For storybook it looks like packager doesn’t find it. Maybe just a small thing? Do you know the reason?

This is in a brand new app and brand new install of storybook

ERROR in ./storybook/addons.js
Module build failed: Error: Couldn't find preset "functional-hmr" relative to directory "/Users/myuser/Documents/Investegy/storybook"
    at /Users/myuser/Documents/Investegy/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/myuser/Documents/Investegy/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/Users/myuser/Documents/Investegy/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/Users/myuser/Documents/Investegy/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/Users/myuser/Documents/Investegy/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/myuser/Documents/Investegy/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/Users/myuser/Documents/Investegy/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/Users/myuser/Documents/Investegy/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/Users/myuser/Documents/Investegy/node_modules/babel-loader/lib/index.js:49:20)
 @ multi ./storybook/addons.js ./node_modules/@storybook/react-native/dist/manager/index.js

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
bvic23commented, Aug 2, 2017

May I ask where did you find my plugin (the link you mentioned)?

I think I know what is the issue here, you set it as a preset but it’s a plugin so your .babelrc should look like this:

{
  "presets": ["react-native"],
  "plugins": ["functional-hmr"]
}

If this does not help, feel free to share your project with me.

0reactions
bvic23commented, Aug 3, 2017

Thanks for getting back, good luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Broken with react-native@0.57 due to packager (local-cli) API ...
storybook/addons.js Module build failed: Error: Couldn't find preset "module:metro-react-native-babel-preset" relative to directory ...
Read more >
Couldn't find preset "env" relative to directory - Stack Overflow
You just need to install babel-preset-env and your code will ... You can check whether .babelrc file exists in the directory above or...
Read more >
Configure Storybook
Configure your Storybook project​​ The main. js configuration file is a preset and, as such, has a powerful interface, but the key fields...
Read more >
Untitled
Jest gives `Cannot find module` when importing components with absolute paths. ... Couldn't find preset "module:metro-react-native-babel-preset" relative to ...
Read more >
30 Answers from Stack Overflow to the most popular webpack ...
I tried to search and search on Google and I can't understand why we need to install one of them to run our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found