Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No constants.ENOENT #8

Closed
wants to merge 1 commit into from
Closed

No constants.ENOENT #8

wants to merge 1 commit into from

Conversation

eee-c
Copy link

@eee-c eee-c commented Sep 25, 2010

Unless I am missing something, there is no constants module in node 2.1/2.2 or in npm. When I tried running a dirty DB, I got the following stacktrace:

Error: Cannot find module 'constants'
at loadModule (node.js:275:15)
at require (node.js:411:14)
at Object.<anonymous> (/home/cstrom/.node_libraries/.npm/dirty/0.9.0/package/lib/dirty/dirty.js:6:17)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)
at Object.<anonymous> (/home/cstrom/.node_libraries/.npm/dirty/0.9.0/package/lib/dirty/index.js:1:80)
at Module._compile (node.js:462:23)

It seems like process.binding('net') is the only place to get at ENOENT now, so this patch uses that.

…e is not available in node 2.1/2.2 or via npm
@felixge
Copy link
Owner

felixge commented Sep 28, 2010

Sorry for the late reply. The constants module is a new addition to node, it first appear in http://github.com/ry/node/commit/31f8fa222e2c65642b28a3267adbe758f5af65b5 .

Let me know if upgrading to that version fixes the issue for you. Otherwise I might merge a patch that allows both older and newer versions of node to work.

@ghost
Copy link

ghost commented Oct 7, 2010

Felix, I'm getting this same error on the latest Node stable as well (version 0.2.3 - 2010.10.02) -- Have I overlooked something?

...Looks like that patch is a good idea after all. :)

@felixge
Copy link
Owner

felixge commented Oct 8, 2010

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants