Closed pranasblk closed 8 years ago
> 192-168-1-146:angular2typescript pb$ cd chapter8/http_websocket_samples/ 192-168-1-146:http_websocket_samples pb$ npm install 192-168-1-146:http_websocket_samples pb$ tsc -w server/auction-rest-server-angular.ts(1,26): error TS2307: Cannot find module 'express'. server/auction-rest-server-angular.ts(2,23): error TS2307: Cannot find module 'path'. server/auction-rest-server-angular.ts(6,51): error TS2304: Cannot find name '__dirname'. server/auction-rest-server-angular.ts(7,51): error TS2304: Cannot find name '__dirname'. server/auction-rest-server-angular.ts(27,28): error TS2304: Cannot find name '__dirname'. server/auction-rest-server-angular.ts(35,21): error TS2339: Property 'find' does not exist on type 'Product[]'. server/auction-rest-server.ts(1,26): error TS2307: Cannot find module 'express'. server/auction-rest-server.ts(31,21): error TS2339: Property 'find' does not exist on type 'Product[]'. server/bids/bid_server.ts(1,26): error TS2307: Cannot find module 'express'. server/bids/bid_server.ts(2,23): error TS2307: Cannot find module 'path'. server/bids/bid_server.ts(4,22): error TS2307: Cannot find module 'ws'. server/bids/bid_server.ts(9,39): error TS2304: Cannot find name '__dirname'. server/bids/bid_server.ts(10,51): error TS2304: Cannot find name '__dirname'. server/bids/bid_server.ts(14,28): error TS2304: Cannot find name '__dirname'. server/bids/bid_server_send.ts(1,26): error TS2307: Cannot find module 'express'. server/bids/bid_server_send.ts(2,23): error TS2307: Cannot find module 'path'. server/bids/bid_server_send.ts(4,22): error TS2307: Cannot find module 'ws'. server/bids/bid_server_send.ts(9,39): error TS2304: Cannot find name '__dirname'. server/bids/bid_server_send.ts(10,51): error TS2304: Cannot find name '__dirname'. server/bids/bid_server_send.ts(16,28): error TS2304: Cannot find name '__dirname'. server/hello_server.ts(1,23): error TS2307: Cannot find module 'http'. server/hello_server_json.ts(1,23): error TS2307: Cannot find module 'http'. server/my-express-server.ts(1,26): error TS2307: Cannot find module 'express'. server/simple_websocket_server.ts(1,26): error TS2307: Cannot find module 'express'. server/simple_websocket_server.ts(2,23): error TS2307: Cannot find module 'path'. server/simple_websocket_server.ts(4,22): error TS2307: Cannot find module 'ws'. server/simple_websocket_server.ts(8,39): error TS2304: Cannot find name '__dirname'. server/simple_websocket_server.ts(9,51): error TS2304: Cannot find name '__dirname'. server/simple_websocket_server.ts(15,28): error TS2304: Cannot find name '__dirname'. 10:52:02 AM - Compilation complete. Watching for file changes.
Can't reproduce. Works fine for me. Make sure you use Typescript 2.0
That's a thing - I was using Typescript 1.8.
Thanks
It couldn't find the directory node_modules/@types - this was not supported prior to 2.0