In my case, this error was caused by a .ts extension on my storybook story. Updating it to .tsx fixed the issue