MUH*_*C P 20 build npm typescript axios
node_modules/axios/index.d.ts:93:12 - error TS2304: Cannot find name 'AbortSignal'.
93 signal?: AbortSignal;
~~~~~~~~~~~
Found 1 error.
Run Code Online (Sandbox Code Playgroud)
当尝试npm run build
节点打字稿项目的命令时,我收到上述错误,与 axio 包相关。在使用 axio 之前, npm run build 工作正常。
cav*_*ick 34
您需要将 DOM 添加到您的 lib 数组中tsconfig.json
:
"lib": [
"es2018",
"DOM"
],
Run Code Online (Sandbox Code Playgroud)
您还可以添加"skipLibCheck": true,
到您的tsconfig.json
under compilerOptions
. 这将忽略 node_modules 下的库中存在的错误
归档时间: |
|
查看次数: |
11359 次 |
最近记录: |