Sometimes(like 70% of the time) when I reinstall wrtc
(node-webrtc on github) I get this build problem
Installing...
Resolving: total 162, reused 73, downloaded 1
Resolving: total 242, reused 187, downloaded 1
Resolving: total 296, reused 295, downloaded 1
Packages: +1
+
Resolving: total 296, reused 295, downloaded 1, done
.../wrtc/0.4.3/node_modules/wrtc install$ node scripts/download-prebuilt.js
.../wrtc/0.4.3/node_modules/wrtc install: internal/modules/cjs/loader.js:613
.../wrtc/0.4.3/node_modules/wrtc install: throw err;
.../wrtc/0.4.3/node_modules/wrtc install: ^
.../wrtc/0.4.3/node_modules/wrtc install: Error: Cannot find module '/rbd/pnpm-volume/rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/node-pre-gyp/bin/node-pre-gyp'
.../wrtc/0.4.3/node_modules/wrtc install: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
.../wrtc/0.4.3/node_modules/wrtc install: at Function.Module._load (internal/modules/cjs/loader.js:526:27)
.../wrtc/0.4.3/node_modules/wrtc install: at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)
.../wrtc/0.4.3/node_modules/wrtc install: at internal/main/run_main_module.js:17:11
.../wrtc/0.4.3/node_modules/wrtc install: Failed
ERROR wrtc@0.4.3 install: `node scripts/download-prebuilt.js`
Exit status 1
at Error: wrtc
at <anonymous> /opt/nvm/versions/node/v10.15.3/lib/node_modules/pnpm/lib/node_modules/@zkochan/npm-lifecycle/index.js:303 var er = new Error('Exit…
at emit events.js:196
at <anonymous> /opt/nvm/versions/node/v10.15.3/lib/node_modules/pnpm/lib/node_modules/@zkochan/npm-lifecycle/lib/spawn.js:55 cooked.emit('close', cod…
at emit events.js:196
at maybeClose internal/child_process.js:1000
at <anonymous> internal/child_process.js:405
at emit events.js:196
at <anonymous> net.js:586
internal/modules/cjs/loader.js:613
throw err;
^
But every time I run my app I get
Require stack:
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/wrtc/0.4.4/node_modules/wrtc/lib/binding.js
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/wrtc/0.4.4/node_modules/wrtc/lib/index.js
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/webtorrent-hybrid/4.0.1/node_modules/webtorrent-hybrid/lib/global.js
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/webtorrent-hybrid/4.0.1/node_modules/webtorrent-hybrid/index.js
- /app/server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
at Function.Module._load (internal/modules/cjs/loader.js:526:27)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/wrtc/0.4.4/node_modules/wrtc/lib/binding.js:6:20)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
internal/modules/cjs/loader.js:613
throw err;
^
Error: Cannot find module '../build/Release/wrtc.node'
Require stack:
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/wrtc/0.4.4/node_modules/wrtc/lib/binding.js
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/wrtc/0.4.4/node_modules/wrtc/lib/index.js
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/webtorrent-hybrid/4.0.1/node_modules/webtorrent-hybrid/lib/global.js
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/webtorrent-hybrid/4.0.1/node_modules/webtorrent-hybrid/index.js
- /app/server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
at Function.Module._load (internal/modules/cjs/loader.js:526:27)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/wrtc/0.4.4/node_modules/wrtc/lib/binding.js:6:20)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
internal/modules/cjs/loader.js:613
throw err;
^
Error: Cannot find module '../build/Release/wrtc.node'
Require stack:
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/wrtc/0.4.4/node_modules/wrtc/lib/binding.js
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/wrtc/0.4.4/node_modules/wrtc/lib/index.js
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/webtorrent-hybrid/4.0.1/node_modules/webtorrent-hybrid/lib/global.js
- /rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/webtorrent-hybrid/4.0.1/node_modules/webtorrent-hybrid/index.js
- /app/server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
at Function.Module._load (internal/modules/cjs/loader.js:526:27)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/rbd/pnpm-volume/1ff9bc55-534c-416d-bd02-b4ca9b588fc5/node_modules/.registry.npmjs.org/wrtc/0.4.4/node_modules/wrtc/lib/binding.js:6:20)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
I’m 99% sure this is a node build error. I tried manally adding node-pre-gyp
but that din’t change anything. I also tried switching the node version number in engines to 10
,11
,13
(I started with 12
). Deleting shrinkwrap and the node_modules folder didn’t help either. I searched up this issue and what I found wasn’t helpful