Using bin/lessc throws "Path must be a string. Received undefined"
Open
Nobody has claimed this yet.
bug
low priority
up-for-grabs
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
As already reported in #2881 and after merging #2891, running lessc --source-map-map-inline styles/main.less in node v6 throws
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.basename (path.js:1355:5)
at /Users/jhnns/dev/jhnns/less.js/bin/lessc:311:61
at Object.<anonymous> (/Users/jhnns/dev/jhnns/less.js/bin/lessc:508:3)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
This is because an undefined path is passed as basename.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with bin/lessc --source-map-map-inline styles/main.less under Node v6. Inspect bin/lessc around lines 296 and 311, where the undefined path is passed as basename. Done means the command no longer throws the reported Path must be a string. Received undefined error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100