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
Importing @auth/core while running Jest fails. This is not the case with other npm modules. When importing anything from @auth/core I get the following error in Jest: Cannot find module '@auth/core/providers/github' I encountered this while writing Auth.js Middlware for Hono: honojs/middleware#52
Environment
System:
OS: macOS 13.2.1
CPU: (12) x64 Apple M2 Pro
Memory: 302.45 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.6.0 - ~/.nvm/versions/node/v19.6.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v19.6.0/bin/yarn
npm: 9.4.0 - ~/.nvm/versions/node/v19.6.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Browsers:
Chrome: 110.0.5481.100
Firefox: 98.0.2
Safari: 16.3
Packages:
@auth/core: 0.5.0
Reproduction URL
https://github.com/yusukebe/jest-authjs
Describe the issue
Importing @auth/core while running Jest fails. This is not the case with other npm modules. When importing anything from @auth/core I get the following error in Jest:
Cannot find module '@auth/core/providers/github'
I encountered this while writing Auth.js Middlware for Hono: honojs/middleware#52How to reproduce
Checkout this PR: honojs/middleware#52
yarn install
yarn build
cd packages/authjs-server
jest
The author of Hono also created this more cut down demo: https://github.com/yusukebe/jest-authjs
Expected behavior
When running tests with Jest imports from @auth/core should import the same as other packages
The text was updated successfully, but these errors were encountered: