Package "bson" has incorrect symlink for pnpm


#1
{ Error: Cannot find module '../build/Release/bson'

at Function.Module._resolveFilename (module.js:476:15)

at Function.Module._load (module.js:424:25)

at Module.require (module.js:504:17)

at require (internal/module.js:20:19)

at Object.<anonymous> (/rbd/pnpm-volume/96ec31a8-b255-4ee5-a1cf-beed46d8a268/node_modules/.registry.npmjs.org/bson/0.2.22/node_modules/bson/ext/index.js:15:10)

at Module._compile (module.js:577:32)

at Object.Module._extensions..js (module.js:586:10)

at Module.load (module.js:494:32)

at tryModuleLoad (module.js:453:12)

at Function.Module._load (module.js:445:3)

at Module.require (module.js:504:17)

at require (internal/module.js:20:19)

at Object.<anonymous> (/rbd/pnpm-volume/96ec31a8-b255-4ee5-a1cf-beed46d8a268/node_modules/.registry.npmjs.org/bson/0.2.22/node_modules/bson/lib/bson/index.js:3:24)

at Module._compile (module.js:577:32)

at Object.Module._extensions..js (module.js:586:10)

at Module.load (module.js:494:32) code: 'MODULE_NOT_FOUND' }

js-bson: Failed to load c++ bson extension, using pure JS version

I had a google and it appears to be an easy fix as others who started using pnpm found incorrectly linked modules too : https://stackoverflow.com/a/28932441