luixaviles / socket-io-typescript-chat

A chat application implemented using Socket.io, TypeScript, Angular and Angular Material components

Home Page:https://medium.com/dailyjs/real-time-apps-with-typescript-integrating-web-sockets-node-angular-e2b57cbd1ec1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find namespace 'server'

worp1900 opened this issue · comments

The following error is thrown when running in a fresh setup:

src/server.ts(65,10): error TS2503: Cannot find namespace 'server'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! myChata-server@0.0.1 build-ts: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the myChata-server@0.0.1 build-ts script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

tsc --version
Version 2.4.2

node --version
v8.3.0

I think I might misunderstand something about TypeScript's namespaces. Would you be able to help?

Hi there!
Thanks for report the issue.
I just added a commit with the fix. It was an issue related with export line on that project.
You should be able to run local server normally. Just make sure update your node_modules directory since I upgraded some module versions into package.json file.

Works like a charm. Thank you sir, appreciate the help!