giuseppeg / xm

₪ extensible HTML
https://giuseppeg.github.io/xm
326 stars 9 forks source link

Use as devDependency #14

Open bakkerjoeri opened 3 years ago

bakkerjoeri commented 3 years ago

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.<anonymous> (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.
AustinGil commented 3 years ago

I'm hitting the same issue