-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@auth/sequelize-adapter - Cannot find module #7826
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
You can verify that the required files are present: https://www.npmjs.com/package/@auth/sequelize-adapter?activeTab=code Cannot tell more without a reproduction. |
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate. Why was this issue marked with the
|
I don't understand what's non-reproducible about importing the package into a .js file and seeing the error displayed in the console! but since that's the way it is, here's a repository where you can hopefully reproduce the error: @pranatk can you try to clone the repo and try on your side to see if you still have the error? |
Hello, I do have the same error while trying to run it. I have reproduced the same steps but still get the same error. |
thanks @Pab450. please always assume that a reproduction is needed, no matter how "trivial" an issue might be. it will accelerate the resolving of any potential issue, as well as contributing to a healthy open source community where we mutually help each other 💚. Your repro was awesome! This should be fixed now, please upgrade the package! 🙏 |
I'm glad to hear that my reproduction was helpful in resolving the issue. I appreciate your efforts in addressing it promptly. Please let me know if there's anything else I can do to assist or contribute to the project. Thank you for all your hard work! |
Adapter type
@auth/sequelize-adapter
Environment
System:
OS: macOS 12.6
CPU: (10) arm64 Apple M1 Pro
Memory: 311.17 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.3.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.6.7 - /opt/homebrew/bin/npm
Browsers:
Chrome: 114.0.5735.133
Safari: 16.0
Reproduction URL
Client project. Using SvelteKit.
Update: https://github.com/Pab450/issue-sequelize-adapter
Describe the issue
when you run the "npm run dev" command and go to the project web page, the console returns :
[vite] Error when evaluating SSR module /src/hooks.server.js: failed to import "@auth/sequelize-adapter"
[ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/pablo/Documents/app/node_modules/@auth/sequelize-adapter/models' imported from /Users/pablo/Documents/app/node_modules/@auth/sequelize-adapter/index.js
when you run the "npm run build" command :
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/pablo/Documents/app/node_modules/@auth/sequelize-adapter/models' imported from /Users/pablo/Documents/app/node_modules/@auth/sequelize-adapter/index.js
How to reproduce
npm create svelte@latest my-app
Which Svelte app template?
│ ● Skeleton project
Add type checking with TypeScript?
│ ● No
Select additional option:
│ ● Prettier
cd my-app
npm i
npm i @auth/sequelize-adapter
create file src/hooks.server.js
add this line : import SequelizeAdapter from '@auth/sequelize-adapter'
save
npm run dev
go to web page indicate by sveltekit
look the error in console
npm run build
look the error in console
Expected behavior
no error...
to fix it go to ./node_modules/@auth/sequelize-adapter/index.js
change first line :
import * as defaultModels from "./models";
to
import * as defaultModels from "./models.js";
the error disappears
The text was updated successfully, but these errors were encountered: