plasma-umass / doppio

Breaks the browser language barrier (includes a plugin-free JVM).
http://plasma-umass.github.io/doppio-demo
MIT License
2.16k stars 174 forks source link

Doppio doesn't compile in TypeScript 2.2 #493

Closed DanielRough closed 7 years ago

DanielRough commented 7 years ago

Hi, I'm having trouble with running 'npm install' I have all the prerequisites (JDK 8, npm, node, grunt-cli) but towards the end of npm install I get this failure message:

Using tsc v2.2.1 src/gLong.ts(35,30): error TS2448: Block-scoped variable 'fromInt' used before its declaration. src/gLong.ts(36,29): error TS2448: Block-scoped variable 'fromInt' used before its declaration. src/gLong.ts(37,33): error TS2448: Block-scoped variable 'fromInt' used before its declaration. src/gLong.ts(38,35): error TS2448: Block-scoped variable 'fromBits' used before its declaration. src/gLong.ts(39,35): error TS2448: Block-scoped variable 'fromBits' used before its declaration. src/gLong.ts(40,38): error TS2448: Block-scoped variable 'fromInt' used before its declaration.

6 non-emit-preventing type warnings
Error: tsc return code: 2 Warning: Task "ts:dev-cli" failed. Use --force to continue.

Aborted due to warnings.

I'm on Ubuntu 16 if that makes any difference, and attach my debug log. npm-debug.txt

Thanks for looking!

jvilk commented 7 years ago

Ah, looks like Doppio doesn't compile in TypeScript 2.2.

A workaround is to run npm install typescript@2.0.3 in the doppio folder to install a compatible version. Let me know if that doesn't work.

DanielRough commented 7 years ago

Thank you for your quick reply! Unfortunately I'm now faced with a syntax error.

Running "ts:dev-cli" (ts) task Compiling... Using tsc v2.0.3 node_modules/@types/jasmine/index.d.ts(39,52): error TS1005: '=' expected.

1 syntax error
Error: tsc return code: 2

Log attached below. Please could you advise? Thank you!

npm-debug.txt

jvilk commented 7 years ago

I really need to switch to using Yarn to lock down these package versions. :-)

My assumption: @types/jasmine is also a newer version that relies on a newer version of TypeScript. The last version I explicitly installed was 2.5.35, so maybe an npm install @types/jasmine@2.5.35 will fix it?

I'll look at all of these package-version-related issues later on tonight. Sorry for the inconvenience!

DanielRough commented 7 years ago

The minor inconvenience of package version issues is more than compensated for by the convenience of doppio :D

Suffice to say that did the trick! I look forward to working with it, thanks again. :-)

jvilk commented 7 years ago

Should now be fixed in master.