第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

無法加載c ++ bson擴(kuò)展

無法加載c ++ bson擴(kuò)展

烙印99 2019-08-24 15:20:11
無法加載c ++ bson擴(kuò)展這里有一個(gè)總節(jié)點(diǎn)noob。我一直在嘗試設(shè)置一個(gè)示例節(jié)點(diǎn)應(yīng)用程序但每次嘗試運(yùn)行時(shí)都會(huì)彈出以下錯(cuò)誤:節(jié)點(diǎn)應(yīng)用Failed to load c++ bson extension, using pure JS version events.js:72         throw er; // Unhandled 'error' event               ^Error: failed to connect to [#$%67890 :27017]     at null.<anonymous> (/home/thejazeto/code/nodejs/authen/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:553:74)     at EventEmitter.emit (events.js:106:17)     at null.<anonymous> (/home/thejazeto/code/nodejs/authen/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:140:15)     at EventEmitter.emit (events.js:98:17)     at Socket.<anonymous> (/home/thejazeto/code/nodejs/authen/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:512:10)     at Socket.EventEmitter.emit (events.js:95:17)     at net.js:830:16     at process._tickCallback (node.js:415:13)
查看完整描述

3 回答

?
不負(fù)相思意

TA貢獻(xiàn)1777條經(jīng)驗(yàn) 獲得超10個(gè)贊

通過添加此行嘗試捕獲塊路徑,輕松解決問題: node_modules/mongoose/node_modules/mongodb/node_modules/bson/ext/index.js

bson = require('bson');  instead 

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

就這些?。?!


查看完整回答
反對(duì) 回復(fù) 2019-08-24
?
守候你守候我

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超10個(gè)贊

在WIN 8.1上

好像我在package.json文件中使用了錯(cuò)誤版本的mongoose。

我從package.json中刪除了行“mongoose”:“^ 3.8.15”

CLI:npm install mongoose --save

現(xiàn)在它在package.json中說“mongoose”:“^ 4.0.6”,我的錯(cuò)誤消失了。


查看完整回答
反對(duì) 回復(fù) 2019-08-24
?
萬千封印

TA貢獻(xiàn)1891條經(jīng)驗(yàn) 獲得超3個(gè)贊

Followint @ user1548357我決定更改模塊文件本身。為了避免下面有效評(píng)論指出的問題,我在postinstall腳本中包含了我的更改,以便我可以設(shè)置并忘記它,并確保它將在我的模塊安裝時(shí)運(yùn)行。

// package.json"scripts": {
    // other scripts
    "postinstall": "node ./bson.fix.js"},

并且腳本是:

// bson.fix.jsvar fs = require('fs');var file = './node_modules/bson/ext/index.js'fs.readFile(file, 'utf8', function (err,data) {
  if (err) {
    return console.log(err);
  }
  var result = data.replace(/\.\.\/build\/Release\/bson/g, 'bson');
  fs.writeFile(file, result, 'utf8', function (err) {
     if (err) return console.log(err);
     console.log('Fixed bson module so as to use JS version');
  });});


查看完整回答
反對(duì) 回復(fù) 2019-08-24
  • 3 回答
  • 0 關(guān)注
  • 704 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)