Workers Auto Approve
web3 does not work with webpack unless I manually install with --unsafe-perm=true
Hi web3 team,
I have tried installing various versions of web3 in my webpack projects. I get very similar errors when using webpack to bundle client-side projects and server-side projects (specifically a serverless project using the serverless-webpack plugin).
The current version I'm using is firstname.lastname@example.org in both my client and server-side projects.
### Client-side project details:
With regards to my client-side react project, installing web3 as a dependency and webpacking results in the following error: `Module not found: Error: Can't resolve 'websocket' in '/home/circleci/project/node_modules/web3-providers-ws/src'`. This is what the package.json dependencies looks like for that project:
This error magically goes away if I remove web3 from my `package.json` dependencies, and manually run: `npm install email@example.com --save --save-exact --unsafe-perm=true` before webpacking my client-side bundle. This means I exclude web3 from my package.json dependencies, and run an extra step afterwards to install web3. I really don't like this, as it prevents me from generating a comprehensive package-lock.json.
It seems like one of the web3 dependencies needs more expansive file permissions in order to compile. Interestingly, this does not happen when I bundle via webpack locally on MacOS, only in my linux OS ci pipeline. I did some research trying to figure out if NPM would let me specify the `--unsafe-perm` flag in my package.json file, but it appears that flag is only respected when installing a single package.
Is there any solution for this, or am I stuck with an extra step installing web3 manually with `--unsafe-perm`?
Setup your profile
Tell us a little about you:
No results found for
Type to search skills..
Required [[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Setup your profile
Our tools are based on the principles of earn (💰), learn (📖), and meet (💬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email: