Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Transient dependency on safer-buffer breaks builds that polyfill with rollup #5059

Closed
1 task done
JonathanLorimer opened this issue May 22, 2022 · 2 comments
Closed
1 task done
Labels
1.x 1.0 related issues Bug Addressing a bug Stale Has not received enough activity

Comments

@JonathanLorimer
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When running web3.js in the browser via a react app served with snowpack I get this error:
1653232319_grim

Expected Behavior

Should be able to polyfill buffer using rollup.

Steps to Reproduce

npx create-snowpack-app react-snowpack --template @snowpack/app-template-minimal
cd react-snowpack
yarn add web3
echo "import web3 from 'web3'" >> index.js
echo "const web3 = new Web3(window.ethereum)" >> index.js
  • Edit package.json and set snowpack version to 3.8.6
  • Add polyfillNode: true to the packageOptions array in `snowpack.config.mjs'
  • Run yarn start

Web3.js Version

1.7.3

Environment

  • Operating System: NixOS
  • Browser: Firefox
  • Node.js Version: 18.1.0
  • NPM Version: Yarn 1.22.18

Anything Else?

The dependencies that transiently depend on safer-buffer:

  • crypto-browserify
  • express > body-parser > raw-body > iconv-lite
  • request > http-signature > sshpk
  • browserify-sign > parse-asn1 > asn1.js

Related Issues:

@JonathanLorimer JonathanLorimer added the Bug Addressing a bug label May 22, 2022
@luu-alex luu-alex added the 1.x 1.0 related issues label Jun 3, 2022
@luu-alex
Copy link
Contributor

luu-alex commented Jun 3, 2022

Hey thanks for submitting this issue, what is specifically causing this issue? crpyto-browserify?

@luu-alex luu-alex mentioned this issue Jun 8, 2022
16 tasks
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

@github-actions github-actions bot added the Stale Has not received enough activity label Aug 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.x 1.0 related issues Bug Addressing a bug Stale Has not received enough activity
Projects
None yet
Development

No branches or pull requests

2 participants