Typescript compiler API set up error: No gulpfile found
Typescript compiler API set up error: No gulpfile found
我正在尝试按照设置部分here (Using the Compiler API)。
这会导致以下错误:
PS C:\Users\Volker\Desktop\ts-projects\using-the-compiler> npm install -g typescript
changed 1 package, and audited 2 packages in 2s
found 0 vulnerabilities
PS C:\Users\Volker\Desktop\ts-projects\using-the-compiler> npm link typescript
npm ERR! code 1
npm ERR! path C:\Users\Volker\AppData\Roaming\npm\node_modules\typescript
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c gulp build-eslint-rules
npm ERR! [13:58:28] No gulpfile found
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Volker\AppData\Local\npm-cache\_logs22-03-15T12_58_28_853Z-debug.log
我的节点版本是v16.13.1
。
我做错了什么?我该如何解决?
我不确定这些说明是怎么回事(可能已经过时了)。只需执行 npm install --save typescript
然后像往常一样导入它:
import * as ts from "typescript";
我正在尝试按照设置部分here (Using the Compiler API)。
这会导致以下错误:
PS C:\Users\Volker\Desktop\ts-projects\using-the-compiler> npm install -g typescript
changed 1 package, and audited 2 packages in 2s
found 0 vulnerabilities
PS C:\Users\Volker\Desktop\ts-projects\using-the-compiler> npm link typescript
npm ERR! code 1
npm ERR! path C:\Users\Volker\AppData\Roaming\npm\node_modules\typescript
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c gulp build-eslint-rules
npm ERR! [13:58:28] No gulpfile found
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Volker\AppData\Local\npm-cache\_logs22-03-15T12_58_28_853Z-debug.log
我的节点版本是v16.13.1
。
我做错了什么?我该如何解决?
我不确定这些说明是怎么回事(可能已经过时了)。只需执行 npm install --save typescript
然后像往常一样导入它:
import * as ts from "typescript";