hook.io icon indicating copy to clipboard operation
hook.io copied to clipboard

Error: require("./api/vundefined") not in NPM, also not in source file

Open andrewtlove opened this issue 8 years ago • 4 comments

Encountering the following error when trying to deploy new hook. Removed/commented out the only package which wasn't previously installed, still receiving the error.

module.js:338
    throw err;
          ^
Unable to require modules which aren't in the npm registry! 

    require("./api/vundefined")

A Hook can only consist of a single source file. 

Any additional files outside of the core Node.js api must be required through npm modules.

Not sure where to start with this one.

andrewtlove avatar Aug 30 '16 14:08 andrewtlove

This seems like a step in the right direction, but I think this might require @Marak.

andrewtlove avatar Sep 01 '16 02:09 andrewtlove

Source code of hook?

Marak avatar Sep 02 '16 01:09 Marak

Messaged privately.

andrewtlove avatar Sep 02 '16 03:09 andrewtlove

I've responded back privately.

I think one of the module dependencies is attempting a dynamic require, which is causing the module not found error handler to eat the stack and assume it's a missing dep.

We should be able to at least give the user back the full error stack with line numbers, I will fix that.

Marak avatar Sep 02 '16 03:09 Marak