Skip to content

ReferenceError: __dirname is not defined #24

Description

@dcjayasuriya2020

code in the datafile is lib.baseDir = path.join(__dirname, '/../.data/');
in git bash it indicates when run for test err,

$ node index.js
file:///E:/Learn/lib/data.js:15
lib.baseDir = path.join(__dirname, '/../.data/');
                        ^

 ReferenceError: __dirname is not defined

How to get clear on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions