clausreinke / typescript-tools

(repo no longer active) Tools related to the TypeScript language
Apache License 2.0
266 stars 29 forks source link

Can't run tss commands on Ubuntu 12.10 #34

Closed fjsj closed 10 years ago

fjsj commented 10 years ago

I've installed typescript-tools using sudo npm install -g typescript-tools.
Then I've tried the tss tests/test.ts example commands, like type 4 2 /home/fjsj/workspace/typescript-tools/tests/test.ts, but all commands return "TSS command processing error: TypeError: Cannot read property 'lineMap' of null".

Any ideas how to solve this?

clausreinke commented 10 years ago

I can't reproduce this (ubuntu vm):

claus@ubuntu:/usr/local/lib/node_modules/typescript-tools$ tss --version
0.3.1
claus@ubuntu:/usr/local/lib/node_modules/typescript-tools$ which tss
/usr/local/bin/tss
claus@ubuntu:/usr/local/lib/node_modules/typescript-tools$ tss tests/test.ts
"loaded /usr/local/lib/node_modules/typescript-tools/tests/test.ts, TSS listening.."
type 4 2 tests/test.ts
{"memberName":{"prefix":"{ ","suffix":"}","delim":"; ","entries":[{"prefix":"a: ","suffix":"","delim":"","entries":[{"prefix":"number","suffix":"","delim":"","entries":[{"prefix":"","suffix":"","delim":"","entries":[]}]}]},{"prefix":"b: ","suffix":"","delim":"","entries":[{"prefix":"number","suffix":"","delim":"","entries":[{"prefix":"","suffix":"","delim":"","entries":[]}]}]}]},"docComment":"","fullSymbolName":"x","kind":"var","minChar":38,"limChar":39,"type":"{ a: number; b: number; }"}
quit
"TSS closing"

most likely a wrong file path in the tss command, eg:

claus@ubuntu:/usr/local/lib/node_modules/typescript-tools$ tss tests/test.ts
"loaded /usr/local/lib/node_modules/typescript-tools/tests/test.ts, TSS listening.."
type 4 2 nowhere.ts
"TSS command processing error: TypeError: Cannot read property 'lineMap' of null"

I'll look into improving the terrible error message, though!-)

fjsj commented 10 years ago

Hi, thanks for the quick response.
It was my error. I was running tss tests/test.JS. Sorry!