node.js - Typescript can not find node core modules -


i trying write class typescript , therefore i'd import native node modules fails because of

[ts] can not find module 'net'.

the same issue happens other native node modules. work bluebird example. (see screenshot).

enter image description here

my tsconfig.json:

{     "compileroptions": {         "target": "es6",         "module": "commonjs",         "moduleresolution": "node",         "sourcemap": true,         "allowjs": true,         "types": ["node"]     },     "exclude": [         "node_modules"     ] } 

my question:

why not recognize native modules 'net' ?

edit: error thrown when executing build task: error ts2688: cannot find type definition file 'node'


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -