Using gremlin from the browser
Hello there! I'm trying to use gremlin from the browser and am getting an error from webpack when I try to import gremlin.
The readme for the npm package says there's experimental support for calling from the browser, but I'm guessing this isn't how I'm supposed to do that.
Our DB is a azure cosmos DB if that helps.
import * as gremlin from 'gremlin';
[build:webpack] node:os - Module build failed: UnhandledSchemeError: Reading from "node:os" is not handled by plugins (Unhandled scheme).
My wild guess is that the gremlin package is trying to import functions from the node stdlib and webpack doesn't support that, but I'm not an expert in any of this and could be off base.1 Reply
Looking at the original PR which added browser support the description indicates polyfill may be necessary to replace the node.js APIs https://github.com/apache/tinkerpop/pull/2506
GitHub
feat:
gremlin-javascript
browser support by tien · Pull Request ...Replace node APIs that have cross runtime equivalent
For those that can't be replaced, use node: prefix so that environment that does polyfill automatically can easily do so
Remove manual p...