We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code in the datafile is lib.baseDir = path.join(__dirname, '/../.data/'); in git bash it indicates when run for test err,
lib.baseDir = path.join(__dirname, '/../.data/');
$ 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?
The text was updated successfully, but these errors were encountered:
const __dirname = path.resolve();
Sorry, something went wrong.
import path from 'path'; import { fileURLToPath } from 'url'; // data path const __filename = fileURLToPath( import.meta.url ); const __dirname = path.dirname( __filename ); //* Base directory of the data folder const templateDir = path.join( __dirname, '/../.data/' );
No branches or pull requests
code in the datafile is
lib.baseDir = path.join(__dirname, '/../.data/');
in git bash it indicates when run for test err,
How to get clear on this?
The text was updated successfully, but these errors were encountered: