Closed jandot closed 3 years ago
(answered in the community slack)
The solution was to use the web build of arangojs instead of the regular npm release. This means using the arangojs/web
entrypoint instead of arangojs
. Svelte does not seem to bundle node compatibility modules on demand by default so querystring
was undefined.
Issue
When trying to access an arangodb database from a svelte-application (https://svelte.dev), I get the error "Uncaught ReferenceError: querystring_1 is not defined".
To recreate:
npx degit sveltejs/template arango_example
cd arango_example
npm install
npm install arangojs
src/App.svelte
with the following:npm run dev
The console will now show
Uncaught ReferenceError: querystring_1 is not defined
.