Cannot find dtrace-provider module

I have a simple nodejs application that throws "Cannot find module './build/Release/DTraceProviderBindings'" . I watch it online and it looks like many people have the same problem when using restify on windows (this is my case, I use restify on Windows 10). Apparently, dtrace-provider is an add-on module for updating , and there is no version for Windows. So what I have tried so far:

  • Update node to version v6.2.0;
  • Remove all modules and run npm install --no-optional ;
  • Uninstall only update and run npm install restify --no-optional ;
  • And my most desperate move is npm install dtrace-provider .

Everything I tried when I discovered github problems, I saw the same error for OSX users with other modules. Not sure what else to try.

Note. This exception does not stop my application, it does not even print an error on the console. I just notice that this is happening with a debugger, in other words, my application is working fine, but it is happening in the background.

List of other modules I use:

 "dependencies": { "restify": "latest", "request": ">=2.11.1", "cheerio": ">=0.10.0", "xml2js": ">=0.2.0", "botbuilder": "^0.11.1", "applicationinsights": "latest" } 
+5
source share
7 answers

This worked for me after switching to Node 6.1 (and when reinstalling Node modules it didn’t work):

  • Install and save dtrace-provider

     $ npm install dtrace-provider --save 
  • Delete node_modules folder

  • Reinstall Node Modules

     $ npm install 

I found this thread before combining your attempts with another solution to Github's problems for updating ( https://github.com/restify/node-restify/issues/1093 ) and simplify it as much as possible.

+4
source

I recently encountered this error on node 6.11.1 . I ran npm rebuild dtrace-provider and solved the problem.

+3
source

The restify command followed an attempt to load a module, requiring it in a try / catch block. You just have to ignore the exception.

+2
source

I know this is an old problem, but I wanted to comment on it if someone else had the same problem.

My problem was caused by brackets in my path. /users/karlgroves/Dropbox (Personal)/foo/bar/bat/project...

Moving a project onto a path without partners worked for me. You will need to erase node_modules and install again.

0
source

I tried many suggestions, but again getting the same error.
Finally, I found the right way to resolve this issue.
Go to node.js and download the latest version of node.js pkg .
After installation, reinstall the software, everything will be in order.

0
source

I recently ran into this error and on node v8.8.1 as @Derek mentioned, I ran npm rebuild dtrace-provider and solved the problem.

0
source

tl; dr; dtrace-provider uses node -gyp, which requires python version> = 2.5 and NOT 3.5

I had this problem on OSX and I found a message that showed the use of the environment variable V=/Users/your_user/your_project npm i dtrace-provider

This let me know that there was a dependency on node-gyp that could not be built ... As soon as I realized that the problem was with this module, I was able to focus on troubleshooting node-gyp .

This led to some output logarithm indicating that my version of python 3.5 was unsupported , and it required version >= 2.5 .

I went in and downloaded python 2.7.x and checked /usr/bin/python 2.7.x to make sure it was there. The remote node module, which ultimately required this module, then used npm cache clean and then reinstalled the module, and this time it seemed to take the correct version of python to be able to create.

Hope this helps someone =)

0
source

All Articles