Skip to content

cannot use modules in CGI-Node #43

@nijo

Description

@nijo

I am getting an error while using CGI-Node to work with MongoDB.

EXCEPTION: Cannot find module 'mongodb'
internal/modules/cjs/loader.js:596
throw err;
^

Error: Cannot find module 'mongodb'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at C:\wamp64\www\Learning_Document5\server.js:1:19
at Script.runInContext (vm.js:102:20)
at Object.runInContext (vm.js:280:6)
at CgiHttpContext.include (C:\wamp64\cgi-bin\cgi-node.js:170:6)
at onReady (C:\wamp64\cgi-bin\cgi-node.js:951:43)
at Object. (C:\wamp64\cgi-bin\cgi-node.js:957:46)
I check same by using node cmd and it worked

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions