我试图从AWS在Ubuntu 16.04中运行我的Node Project。我正在使用:
当我使用pm2或节点运行项目时,我收到以下错误:
ubuntu@ip-172-31-13-71:/var/www/ronteq$ node index.js
/var/www/ronteq/node_modules/mongodb/lib/bulk/ordered.js:15
var bson = new BSON.BSONPure();
^
TypeError: BSON.BSONPure is not a function
at Object.<anonymous> (/var/www/ronteq/node_modules/mongodb/lib/bulk/ordered.js:15:12)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/var/www/ronteq/node_modules/mongodb/lib/apm.js:7:26)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
我的node_modules中是否有更改内容?
"use strict"
var inherits = require('util').inherits,
f = require('util').format,
EventEmitter = require('events').EventEmitter,
BSON = require('bson').native().BSON, **Error Line**
ReadPreference = require('./read_preference'),
在我的本地机器上一切正常。我曾经搜索过一个解决方案,但没有,有人之前已经处理过这个错误了吗?