TypeScript Webpack Project with StoryBook enabled, when running npm run storybook the following error occurs

powershell ERROR in [at-loader] ./node_modules/@types/webpack-env/index.d.ts28313 TS2403 Subsequent variable declarations must have the same type. Variable require must be of type Require, but here has type NodeRequire.


Just delete the shit webpack-env manually

powershell rmdir /s [email protected]


It will still reappear if you run npm i in the future. You need to redelete that folder again.