0
votes

I'm trying to patch one of the web3 packages and use the patched version in my node script. I'm confused about what to use in the npm link program: web3 or web3.js.

Here's what I did:

  1. Cloned the web3 repo.
  2. Executed npm bootstrap (which linked web3 subpackages).
  3. Ran npm link (which put a link to the web3.js folder into my global modules folder).
  4. Created a project named web3test and ran npm install web3 for it.

Now I don't know how to link my project to the local copy of web3. If I run npm link web3, it puts a web3 folder in the global modules directory, which is not the same as my web3.js repository. But my project is supposed to use web3, not web3.js, so it doesn't make sense to link to web3.js.

I'm on Windows 10.

1

1 Answers

0
votes

I realized that web is actually a package within web3.js. So I went into the \web3.js\packages\web3 directory and executed npm link from there. Of course, I had to also run npm build for the main package so that all web3 packages were built.