You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to version 2.2.3 from 2.2.2, I get the following error:
ERROR in ../node_modules/swr/core/dist/index.mjs 3:0-68 Module not found: Error: Can't resolve 'use-sync-external-store/shim' in '/node_modules/swr/core/dist' Did you mean 'index.js'? BREAKING CHANGE: The request 'use-sync-external-store/shim' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.
Additional Context
SWR version: 2.2.3
I saw the changelog of 2.2.3 and I think it has to do with:
Remove index.js suffix of use-sync-external-store/shim to support React Native by @malash in #2767
The text was updated successfully, but these errors were encountered:
unhandledRejection Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/Users/chh/Documents/GitHub/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/use-sync-external-store/shim' is not supported resolving ES modules imported from /Users/chh/Documents/GitHub/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/swr/core/dist/index.mjs
Manually appending /index.js to the line import { useSyncExternalStore } from 'use-sync-external-store/shim'; in node_modules/swr/core/dist/index.mjs and node_modules/swr/infinite/dist/index.mjs seems to solve it temporarily.
Bug report
Description / Observed Behavior
After updating to version 2.2.3 from 2.2.2, I get the following error:
ERROR in ../node_modules/swr/core/dist/index.mjs 3:0-68 Module not found: Error: Can't resolve 'use-sync-external-store/shim' in '/node_modules/swr/core/dist' Did you mean 'index.js'? BREAKING CHANGE: The request 'use-sync-external-store/shim' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.
Additional Context
SWR version: 2.2.3
I saw the changelog of 2.2.3 and I think it has to do with:
Remove index.js suffix of use-sync-external-store/shim to support React Native by @malash in #2767
The text was updated successfully, but these errors were encountered: