gpt4 book ai didi

node.js - 无法加载c++ bson扩展,使用纯JS版本

转载 作者:太空宇宙 更新时间:2023-11-04 02:34:57 24 4
gpt4 key购买 nike

justhacker@justhacker-ThinkPad-Edge-E440:~/tools/codes/microblog$ node app.js 
Failed to load c++ bson extension, using pure JS version

/home/justhacker/tools/codes/microblog/node_modules/express/lib/express.js:89

throw new Error('Most middleware (like ' + name + ') is no longer bundle ^

Error: Most middleware (like session) is no longer bundled with Express and must be

installed separately. Please see https://github.com/senchalabs/connect#middleware.

at Function.Object.defineProperty.get

(/home/justhacker/tools/codes/microblog/node_modules/express/lib/express.js:89:13)

at module.exports (/home/justhacker/tools/codes/microblog/node_modules/connect-

mongo/lib/connect-mongo.js:30:22)

at Object.<anonymous> (/home/justhacker/tools/codes/microblog/app.js:14:42)

at Module._compile (module.js:449:26)

at Object.Module._extensions..js (module.js:467:10)

at Module.load (module.js:349:32)

at Function.Module._load (module.js:305:12)

at Function.Module.runMain (module.js:490:10)

at startup (node.js:124:16)

at node.js:807:3

最佳答案

听起来你使用 npm 安装 bson 模块时没有安装 gcc/g++/make/python 2.x。尝试先安装它们,然后使用 npm 重新安装 bson。

关于node.js - 无法加载c++ bson扩展,使用纯JS版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23190106/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com