next-view-transitions
next-view-transitions copied to clipboard
Testing error: code: 'ERR_MODULE_NOT_FOUND'
When I test the component using <Link> (imported from next-view-transition
), it shows this error:
Error: Cannot find module 'my-project/node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]_react-dom_ij7rotrze5kexwddyuvkazu2ry/node_modules/next/link' imported from my-project/node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]_react-dom_ij7rotrze5kexwddyuvkazu2ry/node_modules/next-view-transitions/dist/index.js Did you mean to import [email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/link.js? ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_MODULE_NOT_FOUND' }
My project is using next 13.5.2, which is different from next-view-transition next 14. However, <Link> is a basic feature and should not be an issue.
When I run pnpm dev
, or build
then start
, the application still works perfectly fine. Just the tests are failing. I'm using @testing-library/react