1602 / 1602/compound

Console: change __dirname to expected __dirname

Open Beginner friendly
#643 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.6k
Forks
179
PR merge metrics
No merged PRs in 30d

Description

Problem: when running `rw c` or `rw c "script"`, the `__dirname` is `/path/to/project/node_modules/compound/lib/server`.
Expected: `__dirname === /path/to/project`

Current workaround: `var dirname = './'`, since `./` points to the correct local dir.

Contributor guide

No contributing guide indexed for this repository

Research direction

Look at the console command implementation, likely in a file like `lib/server/console.js` or `lib/compound.js`. Find where `__dirname` is used or where the script execution context is set. The goal is to ensure the working directory for scripts run via `rw c` is the project root. Test by running a script that logs `__dirname`.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.