Closed codewithpatelo closed 3 years ago
The url
Node module is not available in browsers, and it sounds like you're trying to use something that has Node dependencies in the browser, which won't work.
GitHub issues aren't the right place for support questions like this. Please ask on StackOverflow or in our Discord chat room.
NOTE: All development is currently focused on Sapper's successor, SvelteKit: https://kit.svelte.dev/ While we might fix some particularly pressing or easy to address bugs, it's highly unlikely that most issues filed here will be addressed. You might consider trying out SvelteKit to see if it is free of the issue you're facing and if not filing the issue there instead.
Describe the bug I want to use arangojs module (ArangoDB driver) but Sapper keeps confusing paths. The only log I receive is
"Failed to resolve module specifier "url". Relative references must start with either "/", "./", or "../".
TypeError: Failed to resolve module specifier "url". Relative references must start with either "/", "./", or "../".
No more information than that.
I have rollup json and rollup resolve in my rollup config files but still not working.
Logs "Failed to resolve module specifier "url". Relative references must start with either "/", "./", or "../".
TypeError: Failed to resolve module specifier "url". Relative references must start with either "/", "./", or "../".
To Reproduce Use any sapper template repo and then try importing arangojs driver.
Expected behavior Imports donde correctly
Information about your Sapper Installation:
The output of
npx envinfo --system --npmPackages svelte,sapper,rollup,webpack --binaries --browsers
System: OS: Linux 5.8 Ubuntu 20.04.2 LTS (Focal Fossa) CPU: (4) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz Memory: 4.17 GB / 15.30 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 14.16.0 - /usr/local/bin/node npm: 6.14.11 - /usr/local/bin/npm Browsers: Brave Browser: 89.1.21.76 Firefox: 88.0.1 npmPackages: rollup: ^2.45.0 => 2.45.0 sapper: ^0.28.0 => 0.28.10 svelte: ^3.17.3 => 3.37.0
Severity How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Sapper entirely?
The app cannot function with this bug at all since the error breaks the whole application.
Additional context Add any other context about the problem here.