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.

Storybook error in console after upgrade to 14.3.6

See original GitHub issue
bootstrap:27 Uncaught ReferenceError: exports is not defined
    at ./apps/test/.storybook/preview.js

main.js

  core: {},
  stories: [
    '../src/**/*.stories.mdx',
    '../src/**/*.stories.@(js|jsx|ts|tsx)',
  ],
  addons: ['@storybook/addon-essentials', '@nrwl/react/plugins/storybook'],
  webpackFinal: async (config) => {
    const tsPaths = new TsconfigPathsPlugin({
      configFile: './tsconfig.base.json',
    });

    return merge(config, {
      resolve: {
        plugins: [tsPaths],
      },
    });
  },

test/main.js

module.exports = {
  ...rootMain,
  core: { ...rootMain.core, builder: 'webpack5' }, // This needs to be here and not in rootMain, otherwise nx throws false positive error that it's missing.
  staticDirs: ['../src'],
};

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:25 (23 by maintainers)

github_iconTop GitHub Comments

2reactions
davidslabycommented, Jul 19, 2022

@mandarini Solved by adding unambiguous in babel.config.js. As we are using ES6 together with Common JS in our app, there was an issue with exports / imports. More about that in official documentation of Babel: https://babeljs.io/docs/en/options#misc-options. Thanks for the support on the way. It was really a pleasure to see the effort 😃

1reaction
davidslabycommented, Jul 18, 2022

Hi Katerina, I’m still struggling with that. Unfortunately, I didn’t have time last week to stay focused on that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading Storybook
This upgrades all of the Storybook packages in your project to the latest stable version, perform confidence checks of your package versions, and...
Read more >
Error during 14.0.12 > 14.3.6 upgrade - How to Use GitLab
The migrations had not finished in the previous upgrade - My second attempt at this upgrade worked ok after reverting to pre-upgrade snapshot....
Read more >
J Troubleshooting Oracle Audit Vault and Database Firewall
Solution - 1. The symptom indicates that the Audit Vault Agent has failed to auto upgrade during the Audit Vault Server upgrade. Execute...
Read more >
"Failed to connect to the server" or "Error 1069" after upgrade ...
Open the Local Group Policy Editor Management Console. · In the left pane, under Computer Configuration, click Windows Settings > Security ...
Read more >
The OpenVMS Frequently Asked Questions(FAQ) - Digiater.nl
Update the SCSNODE in MODPARAMS.DAT, and then run AUTOGEN as far as the SETPARAMS phase. (Do not reboot yet.) Modify the DECnet node...
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