6

I tried using "npx update". I am at a total loss why i am getting this error and cannot seem to find even a starting point on this. The only thing I am using npx for is capacitor (with ionic framework). Any help on the reason for this or fixes or just being pointed in the right directions would help

C:\dev\p\bas>npx update
npx: installed 658 in 28.218s
[23:34:41] using file ~C:\Users\Hunter\AppData\Roaming\npm-cache\_npx\6000\node_modules\update\lib\updatefile.js
[23:34:41] starting update.default
[23:34:41] √ running: init

  Current updaters: init

 no updaters were saved.
[23:34:42] finished update.default √ 410ms
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'set-blocking'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at process.<anonymous> (C:\Users\Hunter\AppData\Roaming\npm-cache\_npx\6000\node_modules\update\bin\update.js:4:3)
    at process.emit (events.js:203:15)
    at process.exit (internal/process/per_thread.js:168:15)
    at C:\Users\Hunter\AppData\Roaming\npm-cache\_npx\6000\node_modules\update\bin\update.js:55:15
    at C:\Users\Hunter\AppData\Roaming\npm-cache\_npx\6000\node_modules\update\node_modules\base-generators\index.js:482:13
    at C:\Users\Hunter\AppData\Roaming\npm-cache\_npx\6000\node_modules\update\node_modules\async-each-series\index.js:15:40
sasy solutions
  • 179
  • 1
  • 9

2 Answers2

4

What helped resolve the error for me was updating my npm version first:

  1. npm install -g npm@latest
  2. npm install -g set-blocking
  3. npx update
mr. sudo
  • 347
  • 1
  • 13
1

Just run the npm command to install the missing module:

npm install set-blocking

and then run npx update again

Hope it helps! :)

Jean Carlo
  • 19
  • 4
  • 2
    Installing it globally worked for me since I was not in an npm environment. Command: `npm install -g set-blocking` – Aaron Miller Jul 15 '20 at 23:02
  • 2
    this seemed like it would work but it didn't. I also tried it with the `-g` option, with and without `sudo`. I tried `yarn add set-blocking` with and without `sudo` nothing worked. I still get the same "set-blocking" error every time I run npx update. – gMale Oct 12 '20 at 17:34