mongoDB報錯Cannotfindmodule'../build/Release/bson'
打算用nodejs寫一個blog系統,發現nodejs還是存在很多的坑。在使用mongodb時遇到如下報錯問題:
{ [Error: Cannot find module `../build/Release/bson`] code: `MODULE_NOT_FOUND` } js-bson: Failed to load c++ bson extension, using pure JS version
折騰了一番,最後是這樣解決的:
找到 npm 的module mongodb ..node_modulesmongodb
ode_modulessonextindex.js
並並在catch塊改變bson的js本版路徑:
bson = require(`../build/Release/bson`);
變成
bson = require(`../browser_build/bson`);
如果發現連資料夾browser_biuild都沒有的話(我的情況就是這樣),直接複製檔案:
..node_modulessonuildReleaseson
from
..node_modulessonrowser_buildson
相關文章
- webpack build報錯WebUI
- Spring Boot MongoDB 查詢操作 (BasicQuery ,BSON)Spring BootMongoDB
- How to build your custom release bazel version?UI
- MongoDB server returned error on SASL authentication step: BSON field 'saslCoMongoDBServerError
- mongodb 報錯記錄MongoDB
- thinkphp升級後報錯Declaration of thinkappUrl::build() must be compatible with think outeUrl::build():PHPAPPUI
- laradock 執行報錯 Service 'workspace' failed to build:AIUI
- npm run build打包報錯 npm: should be >= 3.0.0NPMUI
- Win10 Build 19044.1806 Release預覽版釋出Win10UI
- Win11 Build 22000.917 Release預覽版釋出UI
- mongodb c driver bson的巢狀訪問與層次結構MongoDB巢狀
- mongodb啟動報錯怎麼辦MongoDB
- mongodb find報錯怎麼解決MongoDB
- 國內electron-vue build報錯解決方法VueUI
- QT release 生成除錯符合QT除錯
- 微軟Win10 Build 19044.1947 Release預覽版釋出微軟Win10UI
- 如何除錯程式的 Release 版本除錯
- from bson import ObjectIdImportObject
- Jenkins報錯'Gradle build daemon disappeared unexpectedly'的問題解決JenkinsGradleUIAPP
- VS設定release版本可除錯除錯
- 報錯com.android.build.api.transform.TransformException: java.util.zip.ZipException:AndroidUIAPIORMExceptionJava
- 處理範例程式碼Webapi中的Mongodb的Bson中ObjectId反序列化異常WebAPIMongoDBObject
- 直播軟體原始碼,pom 依賴遇到 build 下的依賴報錯原始碼UI
- 記一次jenkins傳送郵件報錯 一直報錯 Could not send email as a part of the post-build publishers問題JenkinsAIUI
- C++報錯:The build tools for v141 (Platform Toolset = 'v141') cannot be found.C++UIPlatform
- 解決 React-Native mac10.14.4 執行報錯 error Failed to build iOS projectReactMacErrorAIUIiOSProject
- idea執行java專案main方法報build failure錯誤的解決方法IdeaJavaAIUI
- MongoDB報錯mongorestore: error while loading shared libraries: libsasl2.so.2MongoDBRESTErrorWhile
- NetScaler Release 14.1 Build 29.63 (nCore, VPX, SDX, CPX, BLX) - 混合多雲應用交付控制器UI
- Gradle專案Build的時候,頻繁報Unknown host 'jcenter.bintray.com' 錯誤GradleUI
- Citrix ADC Release 14.1 Build 29.63 (nCore, VPX, SDX, CPX, BLX) - 混合多雲應用交付控制器UI
- 下載Mycat-server-1.6-RELEASE-sources.jar報錯找不到 raw.githubusercontent.com 的伺服器 IP 地址ServerJARGithub伺服器
- jsp錯誤: "javax.servlet.http.HttpServlet" was not found on the Java Build PathJSJavaServletHTTPUI
- MongoDB資料庫報錯,資料庫檔案丟失資料恢復案例MongoDB資料庫資料恢復
- mongodb和python互動遇到的錯誤MongoDBPython
- Visual Studio Release版本開啟debug視窗進行除錯輸出。除錯
- MongoDB 備份恢復啟動後執行操作報錯:Error:couldn't add user:not masterMongoDBErrorAST
- JavaScript報錯型別(報錯速查)JavaScript型別
- ubuntu apt update 提示 The repository ‘http://xxx Release‘ does not have a Release fileUbuntuAPTHTTP