Skip to content
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

The problem with the order in mongoose #10827

Closed
7 tasks done
AlexRMU opened this issue Nov 8, 2022 · 3 comments
Closed
7 tasks done

The problem with the order in mongoose #10827

AlexRMU opened this issue Nov 8, 2022 · 3 comments

Comments

@AlexRMU
Copy link

AlexRMU commented Nov 8, 2022

Describe the bug

After the build, the order of some parts of the mongoose changes, which leads to errors at run.
Also see Automattic/mongoose#12335 (comment).
Most likely the problem is in Vite.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-jysxco?file=src/hooks.server.js

Steps to reproduce

Run npm i && npm run build && node build/index.js

System Info

any

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

The output is not generated by Vite directly.
The output from Vite is bundled again by svelte-kit.
https:/sveltejs/kit/blob/master/packages/adapter-node/index.js#L55-L68

Also there's many warning about circular dependency around mongoose from rollup.

Closing as this cannot be fixed in Vite. This needs to be reported to svelte kit or rollup.

@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2022
@sapphi-red
Copy link
Member

BTW I guess moving mongoose from devDependencies to dependencies will work.

@AlexRMU
Copy link
Author

AlexRMU commented Nov 8, 2022

👍

@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants