-
Notifications
You must be signed in to change notification settings - Fork 520
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
Problems with module resolution in nitro #612
Comments
Any idea or starting point I can pivot from @pi0 or @danielroe ? I'm pretty much blocked at this point after trying every possible rollup plugin config and tsconfig combination for days 😄 |
In addition, this problem seems to appear with many external libraries. E.g. the EDIT: I created a new minimal reproduction branch (azure-identity): https://github.com/itpropro/nitro-repro/tree/azure-identity |
Any updates @pi0 ? |
This comment was marked as duplicate.
This comment was marked as duplicate.
Does this by any chance relate to unjs/jiti#87? |
I still have the same problems, even after #782 was merged. None of them occur with
With the trace being
Any idea @pi0? |
Environment
Node: 16.18
nitropack: latest
Windows 11 22H2 (but also tested in WSL Ubuntu)
Reproduction
https://github.com/itpropro/nitro-repro
Describe the bug
I am getting multiple bugs with the mongodb library, but I don't really know what they are caused by. Some, like the one in the reproduction repository are occuring in dev and production (after build), but some are only occuring after the app was build and is run with node.
The reproduction repo was the most minimal setup I could reproduce one of the errors with. They all seem so be connected to the
mongodb-connection-string-url
package (https://www.npmjs.com/package/mongodb-connection-string-url).To reproduce the error
mongodb_connection_string_url_1.default is not a constructor
, just executepnpm i
andpnpm dev
and make a POST request tohttp://localhost:3000/test/123
. It should result in this:with a real application, I get this error with production builds (not in dev):
Additional context
Maybe related to https://stackoverflow.com/questions/72718506/nuxt-js-3-application-with-mongoose-mongodb-not-starting-in-production
Logs
No response
The text was updated successfully, but these errors were encountered: