You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a two parter, though I think one is causing the other. Somehow, my @types/ are being ignored:
1712201619:58:36.061:INFO [compiler.karma-typescript]:Compiling project using Typescript2.1.41712201619:58:37.864:ERROR [compiler.karma-typescript]: node_modules/rxjs/Observable.d.ts(68,60): error TS2304:Cannot find name 'Promise'.1712201619:58:37.865:ERROR [compiler.karma-typescript]: node_modules/rxjs/Observable.d.ts(68,70): error TS2304:Cannot find name 'Promise'.1712201619:58:37.865:ERROR [compiler.karma-typescript]: src/subjects/socket-io.spec.ts(6,1): error TS2304:Cannot find name 'describe'.1712201619:58:37.866:ERROR [compiler.karma-typescript]: src/subjects/socket-io.spec.ts(7,5): error TS2304:Cannot find name 'it'.1712201619:58:37.866:ERROR [compiler.karma-typescript]: src/subjects/socket-io.spec.ts(8,9): error TS2304:Cannot find name 'expect'.
which then probably causes the
PhantomJS2.1.1 (Windows70.0.0) ERRORTypeError: undefined is not an object (evaluating 'exports.formatters')
at C:/Users/MOSHMA~1/AppData/Local/Temp/karma-typescript-bundle-976yFHybkGsMnWw.js:3602
Now, my own compilation was throwing errors about the Observable ... Promise thingy, I fixed it by installing @types/es6-shim - but that doesn't seem to fix karma-ts compiler part so I'm guessing the typescript compiler in karma counterpart is ignore the installed @types?
This bug seems to have been fixed in 2.1.5, your example project works with the latest from master if I set "sourceMap": true in tsconfig.json.
You can try it out with npm i https://github.com/monounity/karma-typescript if you don't want to wait, I'm releasing 2.1.5 tomorrow.
If you don't want to set "sourceMap": true in the tsconfig.json, you can override it in the Karma config using karmaTypescriptConfig.compilerOptions.sourceMap!
And thanks for providing a runnable example, it really makes troubleshooting a whole lot easier...
Hah! Hoping someone finds a bug without an example, yes: I've had to do that. I enjoyed it immensely - even had a party to celebrate the fact I could reproduce the bug step by step from the overly excessive description of the post \o/ (not. ever.)
This is a two parter, though I think one is causing the other. Somehow, my
@types/
are being ignored:which then probably causes the
Now, my own compilation was throwing errors about the
Observable ... Promise
thingy, I fixed it by installing@types/es6-shim
- but that doesn't seem to fix karma-ts compiler part so I'm guessing the typescript compiler in karma counterpart is ignore the installed @types?you can check it out @ https://gitlab.com/moshmage/rxjs-socket.io/tree/karma-typescript (
karma start karma.conf.js
)configs:
tsconfig, karma.conf.js, package.json
The text was updated successfully, but these errors were encountered: