vercel / micro-dev

The development environment for `micro`
MIT License
706 stars 77 forks source link

Windows node debugger: SyntaxError: missing ) after argument list #90

Open briangruber opened 6 years ago

briangruber commented 6 years ago

I have an npm script like follows, trying to use node debugger support.

"scripts": {
    "debug": "node --inspect ./node_modules/.bin/micro-dev"   
  }

If I run npm run debug on WINDOWS I always get something like this:

basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:588:28)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1

Is this a windows issue?

bouiboui commented 6 years ago

It seems to be, I solved it by replacing it with:

"scripts": {
    "debug": "node --inspect node_modules/micro-dev/bin/micro-dev.js"   
}

But it seems to be a bigger issue that just this project.