[server-only] [typescript] Typescript "Cannot find" many (all?) modules
See original GitHub issueRunning gulp server.compile_tsc
server/api/todo/dao/todo-dao.ts(1,27): error TS2307: Cannot find module 'mongoose'. server/api/todo/dao/todo-dao.ts(2,26): error TS2307: Cannot find module 'bluebird'. server/api/todo/dao/todo-dao.ts(3,20): error TS2307: Cannot find module 'lodash'. server/api/todo/model/todo-model.ts(1,27): error TS2307: Cannot find module 'mongoose'. server/api/todo/controller/todo-controller.ts(1,26): error TS2307: Cannot find module 'express'. server/api/todo/routes/todo-routes.ts(3,26): error TS2307: Cannot find module 'express'. server/commons/static/index.ts(3,26): error TS2307: Cannot find module 'express'. server/commons/static/index.ts(4,21): error TS2307: Cannot find module 'fs'. server/commons/static/index.ts(8,19): error TS2304: Cannot find name 'process'. server/config/db.conf.ts(3,27): error TS2307: Cannot find module 'mongoose'. server/config/db.conf.ts(4,15): error TS2304: Cannot find name 'require'. server/config/db.conf.ts(8,20): error TS2304: Cannot find name 'process'. server/config/db.conf.ts(8,61): error TS2304: Cannot find name 'process'. server/config/routes.conf.ts(3,26): error TS2307: Cannot find module 'express'. server/config/routes.conf.ts(4,25): error TS2307: Cannot find module 'morgan'. server/config/routes.conf.ts(5,29): error TS2307: Cannot find module 'body-parser'. server/config/routes.conf.ts(6,25): error TS2307: Cannot find module 'helmet'. server/config/routes.conf.ts(10,29): error TS2304: Cannot find name 'process'. server/config/routes.conf.ts(11,21): error TS2304: Cannot find name 'process'. server/routes/index.ts(1,26): error TS2307: Cannot find module 'express'. server/server.ts(3,22): error TS2304: Cannot find name 'process'. server/server.ts(4,5): error TS2304: Cannot find name 'require'. server/server.ts(6,12): error TS2304: Cannot find name 'process'. server/server.ts(8,26): error TS2307: Cannot find module 'express'. server/server.ts(9,21): error TS2307: Cannot find module 'os'. server/server.ts(10,23): error TS2307: Cannot find module 'http'. server/server.ts(24,34): error TS2304: Cannot find name 'process'.
The errors are also in Atom with the TypeScript package install.
I’ve tried doing ‘typings install’ to no avail, and removing the typings
folder from the exclude
stanza in my tsconfig to no avail - the latter spits out tons of “duplicate identifier” errors:
typings/main/ambient/node/index.d.ts(1734,9): error TS2300: Duplicate identifier 'passphrase'. typings/main/ambient/node/index.d.ts(1735,9): error TS2300: Duplicate identifier 'cert'. typings/main/ambient/node/index.d.ts(1736,9): error TS2300: Duplicate identifier 'ca'. typings/main/ambient/node/index.d.ts(1737,9): error TS2300: Duplicate identifier 'crl'. typings/main/ambient/node/index.d.ts(1738,9): error TS2300: Duplicate identifier 'ciphers'. typings/main/ambient/node/index.d.ts(1740,36): error TS2300: Duplicate identifier 'context'. typings/main/ambient/node/index.d.ts(1813,9): error TS2300: Duplicate identifier 'key'. typings/main/ambient/node/index.d.ts(1814,9): error TS2300: Duplicate identifier 'padding'. typings/main/ambient/node/index.d.ts(1817,9): error TS2300: Duplicate identifier 'key'. typings/main/ambient/node/index.d.ts(1818,9): error TS2300: Duplicate identifier 'passphrase'. typings/main/ambient/node/index.d.ts(1819,9): error TS2300: Duplicate identifier 'padding'. typings/main/ambient/node/index.d.ts(1828,18): error TS2300: Duplicate identifier 'Stream'. typings/main/ambient/node/index.d.ts(1833,9): error TS2300: Duplicate identifier 'highWaterMark'. typings/main/ambient/node/index.d.ts(1834,9): error TS2300: Duplicate identifier 'encoding'. typings/main/ambient/node/index.d.ts(1835,9): error TS2300: Duplicate identifier 'objectMode'. typings/main/ambient/node/index.d.ts(1838,18): error TS2300: Duplicate identifier 'Readable'. typings/main/ambient/node/index.d.ts(1854,9): error TS2300: Duplicate identifier 'highWaterMark'. typings/main/ambient/node/index.d.ts(1855,9): error TS2300: Duplicate identifier 'decodeStrings'. typings/main/ambient/node/index.d.ts(1856,9): error TS2300: Duplicate identifier 'objectMode'. typings/main/ambient/node/index.d.ts(1859,18): error TS2300: Duplicate identifier 'Writable'. typings/main/ambient/node/index.d.ts(1871,9): error TS2300: Duplicate identifier 'allowHalfOpen'. typings/main/ambient/node/index.d.ts(1875,18): error TS2300: Duplicate identifier 'Duplex'. typings/main/ambient/node/index.d.ts(1889,18): error TS2300: Duplicate identifier 'Transform'. typings/main/ambient/node/index.d.ts(1911,18): error TS2300: Duplicate identifier 'PassThrough'. typings/main/ambient/node/index.d.ts(1916,9): error TS2300: Duplicate identifier 'showHidden'. typings/main/ambient/node/index.d.ts(1917,9): error TS2300: Duplicate identifier 'depth'. typings/main/ambient/node/index.d.ts(1918,9): error TS2300: Duplicate identifier 'colors'. typings/main/ambient/node/index.d.ts(1919,9): error TS2300: Duplicate identifier 'customInspect'. typings/main/ambient/node/index.d.ts(1980,5): error TS2300: Duplicate identifier 'export='. typings/main/ambient/node/index.d.ts(1988,9): error TS2300: Duplicate identifier 'isRaw'. typings/main/ambient/node/index.d.ts(1990,9): error TS2300: Duplicate identifier 'isTTY'. typings/main/ambient/node/index.d.ts(1993,9): error TS2300: Duplicate identifier 'columns'. typings/main/ambient/node/index.d.ts(1994,9): error TS2300: Duplicate identifier 'rows'. typings/main/ambient/node/index.d.ts(1995,9): error TS2300: Duplicate identifier 'isTTY'. typings/main/ambient/node/index.d.ts(2002,18): error TS2300: Duplicate identifier 'Domain'. typings/main/ambient/serve-static/index.d.ts(85,5): error TS2300: Duplicate identifier 'export='. typings/main/definitions/bluebird/index.d.ts(742,1): error TS2300: Duplicate identifier 'export='. typings/main/definitions/bluebird/index.d.ts(746,1): error TS2300: Duplicate identifier 'export='. typings/main/definitions/bluebird/index.d.ts(750,1): error TS2300: Duplicate identifier 'export='. typings/main/definitions/lodash/index.d.ts(18287,1): error TS2300: Duplicate identifier 'export='. typings/main/definitions/lodash/index.d.ts(18294,1): error TS2300: Duplicate identifier 'export='. typings/main/definitions/lodash/index.d.ts(18298,1): error TS2300: Duplicate identifier 'export='.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
After installing the typings, adding
/// <reference path="../typings/main.d.ts" />
inserver/server.ts
and compiling again did the trick.Alright, I’ll take a look later today.