Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Convert to Browser-Side JS #150

Open
maxholloway opened this issue Jan 9, 2022 · 1 comment
Open

Cannot Convert to Browser-Side JS #150

maxholloway opened this issue Jan 9, 2022 · 1 comment

Comments

@maxholloway
Copy link

Error

Hello, I am trying to use the browserify package in order to use the v3-client in the client. When I run browserify <my-file.js> -o bundle.js I get the following error:

Error: Can't walk dependency graph: ENOENT: no such file or directory, lstat '/Users/maxwellholloway/Desktop/example/worker_threads'
    required by /Users/maxwellholloway/Desktop/example/node_modules/@dydxprotocol/starkex-lib/build/src/signable/index.js

This error does not appear when I run browserify on other packages.

System

System: Mac OS 10.15.7
Node: v17.3.0
npm: 8.3.0

Full Replication Steps

cd ~/Desktop
mkdir example && cd example
npm init -y
npm install @dydxprotocol/v3-client
npm install -g browserify
echo "const { DydxClient } = require('@dydxprotocol/v3-client')" > main.js
browserify main.js -o bundle.js
@3electrons
Copy link

I don't think anybody will support this - I belive it is beyond scope of project itself.
However I encounter similar problem and was able to generate bundle with webpack5.

Did you succeed to generate it with browserify?
Please mind my experience with JS for Web is count in just one dozen of hours. I am planning to use it with my C++ app with embeded JsEngine.

https://github.com/3electrons/dydx-v3-client-webpack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants