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
Hi @CooLNuanfeng,
please check the nitro docs for limitations with worker-like environments.
We can reopen the issue if you have a non-worker environment as target and if you could provide a reproduction repo for us to understand the issue better, especially including nitro config 🙏🏼
PS: Please not that the current LTS version of node is 18, which is the main target for compatibility testing, which is probably not connected to this issue in any way.
Environment
node: v16.14.0
nitropack: lastest
Reproduction
import { MongoClient } from 'mongodb'
export default cachedEventHandler(async (event)=>{
const { page, pageSize = 10 } = getQuery(event)
// Connection URL
const mongoUrl = 'mongodb://localhost:27017';
console.log('aaaa')
const client = new MongoClient(mongoUrl);
console.log('bbbb')
await client.connect();
const db = client.db('mydb');
const collection = `db.collection('list');
......
Describe the bug
[nitro] [request error] [unhandled] mongodb_connection_string_url_1.default is not a constructor
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: