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

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

    Deploying Keystone JS CMS I had same error and I think most elegant solution is this:

    Install npm-check-updates:

    root@keystonejs:~# npm install -g npm-check-updates
    

    Within your keystone site directory, where package.json is placed, check dependencies:

    debian@keystonejs:~/myproject/manalcjim$ npm-check-updates -u
    

    Then update all packages:

    debian@keystonejs:~/myproject/manalcjim$ npm install
    

    And finally if you chose jade for templates, maybe you will need install jade module explicitly:

    debian@keystonejs:~/myproject/manalcjim$ npm install jade --save
    

提交回复
热议问题