[Error: Cannot find module './DTraceProviderBindings']
bobchennan opened this issue · 28 comments
I'm using Ubuntu 11.10, and when I use ldapjs, there is always an error:
[Error: Cannot find module './DTraceProviderBindings']
How can I fix it? What can DTraceProvider do just in ldapjs?
Thanks a lot.
Grrr. This came up on restify too.
So, answering your questions in reverse. DTrace is in ldapjs as if you're on a platform that supports DTrace (Solaris/Mac), an ldapjs server has built-in DTrace probes so you can get real-time metrics from a server instance. We use it every day.
To your second question...well, it should be working on Ubuntu, as the dtrace plugin is basically #ifdef
'd out for non-compliant platforms. Did you get your node via apt, or did you hand install? And what version? If it's not 0.6, and it wasn't built from source, try that.
Lastly, there is a better way forward here, which is for me to change ldapjs to use optionalDependencies and add some JS stubs for DTrace such that even if installation fails, we can keep going. I did that for restify, although the catch is, it requires npm 1.1.5, which doesn't yet exist. I'll leave this ticket open to do that work in ldapjs (I'm a bit wrapped up in other things, at the moment, so it'll be maybe a week before I get back in here).
m
Thanks a lot. I have solved it. I reinstall ldapjs by npm and solve it.
I used to install dtrace-provider in the directory node_path, but I find it's necessary to install under the folder ldapjs/node_modules/.
Oh - yeah, that changed a while ago in node in general.
sudo npm install dtrace-provider
worked for me too on ubuntu 11.10
I just ran into this same issue. Reinstalling through NPM didn't fix it for me :\
same here. any suggestions?
Same problem :(
Using debian.
root@bridge:~/people# nvm ls current
v0.8.1
root@bridge:~/people# npm -v
1.1.33
npm list ...
├─┬ ldapjs@0.5.0
│ ├── asn1@0.1.11
│ ├── buffertools@1.0.9
│ ├── bunyan@0.6.8
│ ├── dtrace-provider@0.0.7
│ ├─┬ nopt@1.0.10
│ │ └── abbrev@1.0.3
│ └── pooling@0.1.0
When I tested on my Mac OS X I did not run into this problem.
I have the same problem.
I am using Ubuntu 12.04 with these versions:
nodejs: 1.1.4
├─┬ ldapjs@0.5.4 extraneous
│ ├── asn1@0.1.11
│ ├── assert-plus@0.1.0
│ ├── buffertools@1.1.0
│ ├── bunyan@0.10.0
│ ├── dtrace-provider@0.0.9
│ ├─┬ nopt@1.0.10
│ │ └── abbrev@1.0.3
│ └─┬ pooling@0.2.2
│ ├── bunyan@0.7.0
│ └─┬ vasync@1.1.1
│ └─┬ verror@1.1.0
│ └── extsprintf@1.0.0
My Testprogramm:
var ldap = require('ldapjs')
var client = ldap.createClient({
url: 'ldap://ip-address:389'
});
client.on('connect', function(connection) {
console.log('connection')
console.log(connection);
})
client.bind('cn=Administrator, cn=Users, dc=mydomain, dc=local', 'password', function(err) {
console.log('binding')
console.log(err)
var opts = {
filter: '(cn=*)',
scope: 'sub',
timeLimit : 0
};
client.search('dc=mydomain,dc=local', opts, function(err, matched) {
console.log(matched)
console.log(err)
});
});
The console-ouptut is:
[Error: Cannot find module './DTraceProviderBindings']
The connection - params are outputed well.
the return values of "err" are NULL
the matched result is {} ... but there are some container in the subtree of specified search. When i run ldapsearch i do recieve a set of searchresults.
Can somebody help with this issue?
Tanks.
ok, i did not solve the issue with the DTraceProvider, but at the moment i accept it as a warning and not as an error.
I found the error in my coding by using wireshark and finally understood it, that the result of a search-request is a searchEntry forEach matching result and not only one resultset.
I know, this text is nearly the same like it is mentioned in the API of ldapjs, but it took a while for me to understand it :-)
Having the same issue here. Treating it as a warning, but I'd still like to get rid of it; it's kind of annoying that one of the five lines my server prints is this ugly error.
How can we suppress or fix this error?
Is there way for this to be a warning outputted to stdout instead of an error output to stderr?
Just upgraded to 0.6.2, and I don't see this error (warning) anymore! Has this been fixed?
I still have this problem in OSX.
I am seeing this with node 0.10.0 and restify@2.3.4, too. Here's what gets printed out:
[Error: Symbol DTraceProviderBindings_module not found.] { [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' } { [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
had the same issue on OSX with NodeJS v0.10.1, but uninstall restify and/or ldapjs and npm install again...will fix your issues. See #89
I don't know if this is a npm-issue but it seems that you need to force reinstalling previous installed dtrace-modules?
(Warnings still exist, but no errors or code that stops running.)
@joeyvandijk I just upgraded to node 0.10.1, uninstalled and reinstalled restify, to no avail. Here's a look at the relevant portion of my npm ls:
├─┬ restify@2.3.4 │ ├── assert-plus@0.1.2 │ ├── backoff@2.0.0 │ ├─┬ bunyan@0.18.3 │ │ └── mv@0.0.4 │ ├── deep-equal@0.0.0 │ ├── dtrace-provider@0.2.8 │ ├── formidable@1.0.11 │ ├─┬ http-signature@0.9.11 │ │ ├── asn1@0.1.11 │ │ └── ctype@0.5.2 │ ├── keep-alive-agent@0.0.1 │ ├── lru-cache@2.2.2 │ ├── mime@1.2.9 │ ├── negotiator@0.2.5 │ ├── node-uuid@1.4.0 │ ├── once@1.1.1 │ ├── qs@0.5.3 │ ├── semver@1.1.2 │ ├── spdy@1.4.6 │ └─┬ verror@1.3.5 │ └── extsprintf@1.0.0
@euskode have the same packages list but do not understand your problem. Still warnings, but not working? And do you use OSX?
@joeyvandijk everything works, I just get the errors, so this isn't a massive issue in any way, but I do want everyone to know that the error messages are still very much present.
The error messages going to stderr are not from restify, but node. I can't
fix those, because that's what optionalDependencies that aren't found do in
node core. This has come up many times before, and I as I always say,
please go tell node to stop spewing to stderr.
On Thu, Mar 28, 2013 at 11:40 AM, Mikel Cármenes Cavia <
notifications@github.com> wrote:
@joeyvandijk https://github.com/joeyvandijk everything works, I just
get the errors, so this isn't a massive issue in any way, but I do want
everyone to know that the error messages are still very much present.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/64#issuecomment-15606645
.
Seeing the same thing on clean install...
OS X 10.8.4
➜ proxy node -v && npm -v
v0.10.15
1.3.5
➜ proxy npm install dtrace-provider express passport passport-ldapauth ldapjs
➜ proxy node auth.js
[Error: Symbol DTraceProviderBindings_module not found.]
{ [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
➜ proxy cat auth.js
var express = require('express'),
passport = require('passport'),
LdapStrategy = require('passport-ldapauth').Strategy;
var OPTS = {
server: {
url: 'ldap://localhost:389',
adminDn: 'cn=root',
adminPassword: 'secret',
searchBase: 'ou=passport-ldapauth',
searchFilter: '(uid={{username}})'
}
};
var app = express();
passport.serializeUser(function(user, cb) {
return cb(null, user.dn.toString());
});
passport.use(new LdapStrategy(OPTS));
app.configure(function() {
app.use(express.bodyParser());
app.use(passport.initialize());
});
app.post('/login', passport.authenticate('ldapauth'), function(req, res) {
res.send({status: 'ok'});
});
I'm having this same problem. Has there been any resolution?
+1
The dtrace bindings are optional. If the package is not installed, they should simply be no-ops.
This issue is also occurring on Meteor 1.0.3.2 / OS X 10.10 when installed via the typ:accounts-ldap package (which wraps ladpjs)
Same. Error still present through Meteor typ:accounts-ldap package. Why (still) an error for an optional module? No clean solution for this yet?
Reinstalling restify fixed it for me.
Reinstalling restify fixed it for me as well.