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).
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
Post a Comment