Skip to content

TypeError: Cannot read property 'filename' of undefined #9

@hlfshell

Description

@hlfshell

I get the following when testing the example code from the README:

TypeError: Cannot read property 'filename' of undefined
    at Function.meta.fix (C:\Users\someone\something\node_modules\desktop-screenshot\node_modules\flavored-path\node_modules\meta-path\lib\meta-path.js:105:39)
    at module.exports (C:\Users\someone\something\node_modules\desktop-screenshot\node_modules\flavored-path\node_modules\meta-path\lib\meta-path.js:92:24)
    at Object.path.normalize (C:\Users\someone\something\node_modules\desktop-screenshot\node_modules\flavored-path\lib\flavored-path.js:121:9)
    at Screenshot.parseArgs (C:\Users\someone\something\node_modules\desktop-screenshot\module.js:97:32)
    at new Screenshot (C:\Users\someone\something\node_modules\desktop-screenshot\module.js:10:20)
    at module.exports (C:\Users\someone\something\node_modules\desktop-screenshot\module.js:2:9)
    at repl:1:1
    at REPLServer.defaultEval (repl.js:272:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)

This is fixed by commenting out the path.normalize code in lines 96-97 in modules.js. Something within one of your sub modules does not like string paths anymore.

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