在 Windows 计算机上使用 couchbase 的项目grunt build
可以完全没有问题。
但是,在 Mac OS 计算机上执行相同操作会引发以下错误:
/Users/tiagoalves/workspace/projects/myproject/node_modules/myproject-clients/node_modules/couchbase/lib/binding.js:17
throw e;
^
Error: dlopen(/Users/tiagoalves/workspace/projects/myproject/node_modules/myproject-clients/node_modules/couchbase/prebuilt/win/x64/couchbase_impl.node, 1): no suitable image found. Did find:
/Users/tiagoalves/workspace/projects/myproject/node_modules/myproject-clients/node_modules/couchbase/prebuilt/win/x64/couchbase_impl.node: unknown file type, first eight bytes: 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/Users/tiagoalves/workspace/projects/myproject/node_modules/myproject-clients/node_modules/couchbase/node_modules/bindings/bindings.js:74:15)
at tryLoadBinding (/Users/tiagoalves/workspace/projects/myproject/node_modules/myproject-clients/node_modules/couchbase/lib/binding.js:13:31)
at Object.<anonymous> (/Users/tiagoalves/workspace/projects/myproject/node_modules/myproject-clients/node_modules/couchbase/lib/binding.js:31:17)
at Module._compile (module.js:456:26)
at Module._extensions..js (module.js:474:10)
at Object.Module._extensions..js (/Users/tiagoalves/workspace/projects/myproject/node_modules/grunt-mocha-istanbul/node_modules/istanbul/lib/hook.js:102:13)
我一直试图解决这个问题一个星期了。我做了一个完整的 nodejs 和 npm 重新安装,同样用于brew等等......发生了什么事?