Closed
Description
Current Behavior:
package.json
{
"scripts": {
"start": "ts-node index.ts"
},
"devDependencies": {
"@types/node": "^14.14.16",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
}
}
index.ts
console.log(process.argv.slice(2))
then,
npx ts-node index.ts "a b"
and get
[ 'a', 'b' ]
Expected Behavior:
should print
[ 'a b' ]
In fact,
npm start "a b"
prints
[ 'a b' ]
Steps To Reproduce:
see Current Behavior section.
Environment:
- OS: OS: Windows 10 Pro 2004 (19041.685)
- Node: 15.5.0
- npm: 7.3.0, 6.14.10
#2423 seems related
Activity