basarat / basarat/typescript-book
NodeJS QuickStart step 4 produces error
- Dominant language
- TypeScript
- Stars
- 21.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
What am I doing wrong in my command? I am on Windows 10.
PS D:\proj\tsnode> node ./node_modules/.bin/tsc --init
D:\proj\tsnode\node_modules\.bin\tsc:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at Object.exports.runInThisContext (vm.js:78:16)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3
PS D:\proj\tsnode>
Contributor guide
Research direction
Review NodeJS QuickStart step 4 and reproduce the shown command on Windows 10, checking how the TypeScript compiler entry point is invoked. Update the documented instruction so it works on Windows, then verify that it reaches the intended TypeScript initialization without the shell-script syntax error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100