arangodb / arangojs

The official ArangoDB JavaScript driver.
https://arangodb.github.io/arangojs
Apache License 2.0
601 stars 107 forks source link

Rollup Error: Could not resolve "./analyzer" from "./analyzer?commonjs-external" #806

Closed carsonbird closed 3 months ago

carsonbird commented 8 months ago

I'm running a Nuxt 3 app, in which I'm using the arangojs package on the serverside (so, an ESM node/vite server). As of yesterday, I've started getting the following error during build time, and I've traced it back to arangojs:

Rollup Error: Could not resolve "./analyzer" from "./analyzer?commonjs-external"

I'm not too familiar with these internals. Can anyone help me figure this out? I'm using arangojs ^8.7.0.

I can see that 8.7.0 came out about 8 days ago, and I probably updated my dependencies the day I started getting the error. I would bet the issue was introduced in 8.7.0.

pluma4345 commented 6 months ago

?commonjs-external is a vite-ism. You probably updated vite or one of its plugins alongside arangojs. I'm not sure what is causing the error you're seeing but it looks like vite or one of its plugins is adding that and vite/rollup is failing to resolve the module in question for some reason.

pluma4345 commented 3 months ago

v9 adds ESM support so that should fix it. Feel free to reopen this issue if the problem persists after upgrading to arangojs v9.