0

Running below code brings me path without project folder

const path = require('path') 
const absolutepath = path.resolve(argv.directory)

D:\packages\example\dist

However real absolute path is

D:\project\packages\example\dist

Can someone help me , why I cant get project folder in absolute path

1 Answer 1

1

Simply with :

__dirname

Example :

console.log( __dirname )

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.