Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version

前端 未结 30 2302
予麋鹿
予麋鹿 2020-11-28 02:19

I am getting the below error:

{ [Error: Cannot find module \'../build/Release/bson\'] code: \'MODULE_NOT_FOUND\' } 
  js-bson: Failed to load c++ bson extens         


        
30条回答
  •  一向
    一向 (楼主)
    2020-11-28 02:53

    I've tried bson = require('../browser_build/bson'); but end up running into another error

    Cannot set property 'BSON_BINARY_SUBTYPE_DEFAULT' of undefined

    Finally I fixed this issue simply by npm update, this will fix the bson module in mongoose.

提交回复
热议问题