Closed danvoyce closed 7 years ago
Is your code ran client side ?
yep :) It says this works in Modern Browsers?
Thanks for sharing this. Can you try with v2.3.2 please? npm install gremlin@2.3.2
should do the trick (feel free to rm -rf node_modules/gremlin
prior just to be sure).
I published v2.3.2 a few days ago with a new version of ws
so maybe this introduced backward compatibility breaking changes when using this library in the browser like the one you're mentioning here.
As @dragma pointed out, the issue is most likely related to the fact that your code is running in a browser. How do you bundle your code? Do you use Webpack or Browserify, or something else?
fs
does not exist in the client since it's a Node.js core used for interacting with the filesystem. Some web bundler shim these dependencies, and it could require a bit of tuning to have gremlin-javascript work in the browser depending on how you bundle your front end code.
That did the trick! I was for a minute wondering if this was for server side only, based on those errors.
And yes, using Webpack.
Thanks!
I've ran the basic installation, but as soon as I import Gremlin
import { createClient } from 'gremlin';
I get the following errors:
and
Am running it with webpack and the latest stable version of Node (7.4). Have also tried it with version 5.9, but still get same issue.
Any ideas?