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

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

    You should never change files in NODE_MODULES library folder.

    Those files are result of npm install command.

    Basicaly, I think for Windows users - right way is use VM. It's what I'm doing when I work from home.

    All you need:

    for CentOS: yum install gcc gcc-c++ make openssl-devel

    for Debian/Ubuntu: apt-get install build-essential

    and then npm install or, if you have already done it - npm update

提交回复
热议问题