我知道这个问题已经问过很多次了 here和here。 我已经尝试了所有关于这些链接的建议,等等。 我尝试安装最新的Bunyan
sudo npm install bunyan@1.8.12 --unsafe-perm=true --allow-root
我安装并重建了最新的dtrace-provider
sudo npm install dtrace-provider@0.8.7 --unsafe-perm=true --allow-root
sudo npm rebuild dtrace-provider@0.8.7 --unsafe-perm=true --allow-root
它成功构建了模块。
+ NODE_GYP_STATUS=0
+ [[ 0 -ne 0 ]]
+ exit 0
touch Release/obj.target/ndtp.stamp
npm WARN swaggerize-express@4.0.5 requires a peer of express@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN tr-stack@1.0.0 No repository field.
+ dtrace-provider@0.8.7
尽管如此,我仍然遇到此错误:
Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/yogeshsingh/TradeRev/code/tr-stack/node_modules/vogels/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
节点版本和npm版本如下:
node: v11.6.0
npm : 6.5.0