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

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

    While creating setup for www.spotdekho.com in new windows10 machine, I was unable to run command "nodemon web.js" due same error

    "Error: Cannot find module '../build/Release/bson'"

    Got it fixed by below steps :

    1. Create folder "Release" inside "node_modules\bson\build\" location
    2. Copy bson.js from "node_modules\bson\browser_build\"
    3. Paste bson.js inside "node_modules\bson\build\Release" folder.

    This will resolve the issue.

    PS : I am using mongoose version 4.8.8 .

    Thanks :) , hope it helps someone .

提交回复
热议问题