Skip to content

Cannot read property '.js' of undefined #1

Open
@dimanchee

Description

@dimanchee

Hi,

I am trying to hook a function in node module, but I got error as mentioned in the title, below is my code:

var hook = require('node-hook');
function Request(method, url) {
alert(url);
}
hook.hook('.js', Request);
require('./node_modules/module_name/index');

Is it possible on the way I am trying to archive?

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