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

Object is not a function #3

Open
argosback opened this issue Jan 14, 2014 · 1 comment
Open

Object is not a function #3

argosback opened this issue Jan 14, 2014 · 1 comment

Comments

@argosback
Copy link

when I try to include your module with var define = require('constants')(exports), I get a exception

E:\Development\nodejs\node_modules\marval\lib\marval.js:11
var define = require('constants')(exports)
                                  ^
TypeError: object is not a function
    at Object.<anonymous> (E:\Development\nodejs\node_modules\marval\lib\marval.js:11:34)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (E:\Development\nodejs\node_modules\marval\index.js:8:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
@dominicbarnes
Copy link
Owner

It looks like constants is a name that is used by node core, so the returned module is actually an (undocumented) internal module set up for constants... looks like I need to rename my module :(

leomillon added a commit to leomillon/3to that referenced this issue Mar 22, 2014
Usage of 'node-constats' lib without NPM

Due to issue : dominicbarnes/node-constants#3
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

No branches or pull requests

2 participants