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

Fuels package issue on browser environment #649

Closed
luizstacio opened this issue Dec 9, 2022 · 1 comment · Fixed by #650
Closed

Fuels package issue on browser environment #649

luizstacio opened this issue Dec 9, 2022 · 1 comment · Fixed by #650
Labels
bug Issue is a bug

Comments

@luizstacio
Copy link
Member

What version of fuels-ts are you using?

0.24.0

Steps to Reproduce

  1. Create a frontend project using react-create-app or clone https://github.com/FuelLabs/fuels-wallet
  2. Import fuels version 0.24.0
  3. Run build or a dev run command

Expected Behavior

Fuels package should be safe for browser us.

Actual Behavior

On Wallet using vite bundler the current error is:

'execSync' is not exported by __vite-browser-external, imported by ../../node_modules/.pnpm/@fuel-ts+versions@0.24.0/node_modules/@fuel-ts/versions/dist/index.mjs
file: <path>/fuels-wallet/node_modules/.pnpm/@fuel-ts+versions@0.24.0/node_modules/@fuel-ts/versions/dist/index.mjs:1:576
@arboleya
Copy link
Member

arboleya commented Dec 9, 2022

@luizstacio This one slipped through my radar, despite @camsjams warning.

I focused on the npm libraries and forgot node native modules. Although #650 might seem to solve the problem, it doesn't. Other packages (exported on fuels/index) also import the versions package, which will yield the same problem.

I will cut a patch for it:

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

Successfully merging a pull request may close this issue.

2 participants