Search code examples
reactjstypescriptwebpacknext.jsstorybook

How to fix NextJS webpack error: You may need an appropriate loader to handle this file type, currently no loaders are configured


I generated NextJS project using TypeScript template and I want to add my Storybook to the project. Storybook is written in TypeScript. When I'm adding Storybook to my NextJS project I'm getting such webpack error: "You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file ". Both NextJS and Storybook are using webpack 5. How is possible to fix this error?

Here is full error which I'm getting: enter image description here


Solution

  • This library is not transpiled. You can try using next-transpile-modules.