next-auth-mock icon indicating copy to clipboard operation
next-auth-mock copied to clipboard

Can't resolve '@tomfredenberg/next-auth-mock/storybook'

Open amir-hossein-zarei opened this issue 1 year ago • 2 comments

Hello I'm trying to use this package on Storybook 6.5.16 with Nextjs 16 and 19 but I'm getting this error:

ERROR in ./node_modules/@tomfreudenberg/next-auth-mock/dist/storybook/preset/preview.js
Module not found: Error: Can't resolve '@tomfreudenberg/next-auth-mock/storybook' in '/home/x/Projects/x/node_modules/@tomfreudenberg/next-auth-mock/dist/storybook/preset'
 @ ./node_modules/@tomfreudenberg/next-auth-mock/dist/storybook/preset/preview.js 8:17-68
 @ ./node_modules/@tomfreudenberg/next-auth-mock/dist/storybook/preset/preview.js-generated-config-entry.js
 @ multi ./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js ./node_modules/@storybook/core-client/dist/esm/globals/globals.js (webpack)-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined ./storybook-init-framework-entry.js ./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js ./node_modules/@tomfreudenberg/next-auth-mock/dist/storybook/preset/preview.js-generated-config-entry.js ./.storybook/preview.tsx-generated-config-entry.js ./generated-stories-entry.js

I changed file imports to relative pass in all mentioned files and it seems it solved the problem but I'm seeking for a better fix.

amir-hossein-zarei avatar Mar 28 '23 14:03 amir-hossein-zarei