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
require.resolve()
What means of current working directory. In my project
current working directory
learnNode └─ node_modules └─ webpack-cli └─ bin └─ cli.js
const resolveCwd = require('resolve-cwd'); const filePath = 'webpack-cli/bin/cli.js'; const localFile = resolveCwd.silent(filePath); console.log(process.cwd()) console.log(localFile)
process.cwd() print is /Users/tt/Study/leanrNode localFile print is /Users/tt/Study/leanrNode/node_modules/webpack-cli/bin/cli.js
process.cwd()
/Users/tt/Study/leanrNode
localFile
/Users/tt/Study/leanrNode/node_modules/webpack-cli/bin/cli.js
Resolve the path of a module like require.resolve() but from the current working directory
Should current working directory be 'leanrNode'?
Expected localFile print /Users/tt/Study/leanrNode/webpack-cli/bin/cli.js?
/Users/tt/Study/leanrNode/webpack-cli/bin/cli.js
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What means of
current working directory
.In my project
process.cwd()
print is/Users/tt/Study/leanrNode
localFile
print is/Users/tt/Study/leanrNode/node_modules/webpack-cli/bin/cli.js
Resolve the path of a module like
require.resolve()
but from the current working directoryShould current working directory be 'leanrNode'?
Expected
localFile
print/Users/tt/Study/leanrNode/webpack-cli/bin/cli.js
?The text was updated successfully, but these errors were encountered: