Use as devDependency
- Dominant language
- JavaScript
- Stars
- 323
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
I ran into an issue using xm as a devDependency. When running `npx xm dev` while it's intalled, I get the following when visiting the website:
```
₪ Serving / ...
obfuscated/node_modules/xm/utils.js:62
onMsg(child.stdout.toString());
^
TypeError: Cannot read property 'toString' of null
at spawn (obfuscated/node_modules/xm/utils.js:62:24)
at Server. (obfuscated/node_modules/xm/index.js:145:9)
at Server.emit (events.js:310:20)
at parserOnIncoming (_http_server.js:786:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
```
It works fine of course if I don't have `xm` installed locally.
## Steps to reproduce:
1. On a fresh project `npm install --save-dev xm`
2. Run `npx xm dev`
3. Visit the address where the website is served.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the listed fresh-project steps, then inspect utils.js:62 and the spawn call reached from index.js:145. Confirm the behavior when xm is installed as a devDependency, and consider the null stdout failure path. Done means npx xm dev serves the site without the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100