robertoschler
over 1 year ago  Karma: 50
Cannot find “web-requestManager” exception when requiring Web3.js module from Javascript?

I have a Node.js v8.11.1 app running on a Ubuntu 14.04 LTS box that uses the Web3.js module. When I upgraded to the latest beta version, the version shown when running "npm outdated" which is version 1.0.0-beta2, I started getting an exception whenever I ran my app, shown below:

Error cannot find module 'web3-requestManager'

At this statement:

var requestManager = require('web3-requestManager');

The error occurs in this source file in the Web3.js Node package:

./node_modules/web3/packages/web3-core/src/index.js

I noticed that during the npm install operation there was a complaint of "broken dependecy links" in relation to version 1.0.0-beta2. (Yes, the error message has a typo in it, not my doing). To get things to work I had to:

  • Change the version in package.json to version 1.0.0-beta.33.

  • Remove the package-lock.json file

  • Remove the node_modules directory

  • Clear out the npm cache (WARNING, don't do the following if you don't know what it does!):

    $ npm cache clear --force

I then executed "npm install --save" and let everything reinstall. Now everything works again but only with an older version of Web3.js

Has anybody seen this error and knows how to fix things so I can use the latest version? This is a known issue on the Web3.js GitHub:

https://github.com/ethereum/web3.js/issues/966

web3.js
infura
javascript
exception
robertoschler
over 1 year ago  Karma: 50
Cannot find “web-requestManager” exception when requiring Web3.js module from Javascript?

I have a Node.js v8.11.1 app running on a Ubuntu 14.04 LTS box that uses the Web3.js module. When I upgraded to the latest beta version, the version shown when running "npm outdated" which is version 1.0.0-beta2, I started getting an exception whenever I ran my app, shown below:

Error cannot find module 'web3-requestManager'

At this statement:

var requestManager = require('web3-requestManager');

The error occurs in this source file in the Web3.js Node package:

./node_modules/web3/packages/web3-core/src/index.js

I noticed that during the npm install operation there was a complaint of "broken dependecy links" in relation to version 1.0.0-beta2. (Yes, the error message has a typo in it, not my doing). To get things to work I had to:

  • Change the version in package.json to version 1.0.0-beta.33.

  • Remove the package-lock.json file

  • Remove the node_modules directory

  • Clear out the npm cache (WARNING, don't do the following if you don't know what it does!):

    $ npm cache clear --force

I then executed "npm install --save" and let everything reinstall. Now everything works again but only with an older version of Web3.js

Has anybody seen this error and knows how to fix things so I can use the latest version? This is a known issue on the Web3.js GitHub:

https://github.com/ethereum/web3.js/issues/966

web3.js
infura
javascript
exception

Earn tokens by posting and answering questions about blockchain!
Karma to eth
BE THE FIRST TO ANSWER