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

前端 未结 30 2299
予麋鹿
予麋鹿 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:43

    This worked for me. Search in your workspace for the text:

    "../build/Release/bson"
    

    You will probably find it inside the mongose and monk modules.

    Then replace each:

    bson = require('../build/Release/bson');
    

    with:

    bson = require('bson');
    

    that's all!

提交回复
热议问题