Cannot find module dtrace-provider

2019-04-22 18:34发布

I have a simple nodejs application that is throwing "Cannot find module './build/Release/DTraceProviderBindings'". I look it up online and it looks like that a lot of people are having the same problem when using restify on windows (which is my case, I'm using restify on windows 10). Apparently, dtrace-provider is a optional module for restify and there is no version of it for windows. So, what I tried so far:

  1. Update node to v6.2.0;
  2. Uninstall all modules and run npm install --no-optional;
  3. Uninstall only restify and run npm install restify --no-optional;
  4. And my most desperate move npm install dtrace-provider.

Everything I tried where found on github issues, I've seen same error on OSX users with other modules. Not sure what else to try.

Note: This exception does not stop my application, not even prints the error on the console, I just notice that this was happening using the debugger, in other words, my application runs fine, but this keeps happening on the background.

List of other modules I'm using:

"dependencies": {
    "restify": "latest",
    "request":  ">=2.11.1",
    "cheerio":  ">=0.10.0",
    "xml2js":   ">=0.2.0",
    "botbuilder": "^0.11.1",
    "applicationinsights": "latest"
  }

7条回答
戒情不戒烟
2楼-- · 2019-04-22 19:30

I recently ran into this error as well on node 6.11.1. I ran npm rebuild dtrace-provider and that resolved the problem.

查看更多
登录 后发表回答