Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 由于typescript文件,运行node js应用程序时出错_Node.js_Typescript_Npm - Fatal编程技术网

Node.js 由于typescript文件,运行node js应用程序时出错

Node.js 由于typescript文件,运行node js应用程序时出错,node.js,typescript,npm,Node.js,Typescript,Npm,以下是即将出现的错误: D:\agent master>npm运行构建 > agent@0.1.0生成D:\代理主机 >tsc node_modules/@types/whatwg fetch/index.d.ts(6,1):错误TS2688:找不到“whatwg streams”的类型定义文件。 node_modules/@types/whatwg fetch/index.d.ts(97,11):错误TS2304:找不到名称“ReadableStream”。 npm错误!代码失效循环 npm错

以下是即将出现的错误:

D:\agent master>npm运行构建
> agent@0.1.0生成D:\代理主机
>tsc
node_modules/@types/whatwg fetch/index.d.ts(6,1):错误TS2688:找不到“whatwg streams”的类型定义文件。
node_modules/@types/whatwg fetch/index.d.ts(97,11):错误TS2304:找不到名称“ReadableStream”。
npm错误!代码失效循环
npm错误!二号
npm错误!agent@0.1.0build:`tsc`
npm错误!退出状态2
npm错误!
npm错误!失败agent@0.1.0构建脚本。
npm错误!这可能不是npm的问题。上面可能还有其他日志输出。
npm错误!此运行的完整日志可在以下位置找到:
npm错误!C:\Users\tushar.gupta\AppData\Roaming\npm cache\\ u logs\2019-12-12T13\u 36\u 11\u 813Z-debug.log

看起来您可能缺少包
@types/node
,其中包含所有特定于节点的类型,包括
ReadableStream
。尝试安装它,看看它是否能解决您的问题