Gulp 4 引入了新的方法,例如series()
和parallel()
,它们不是当前 gulp 定义文件的一部分。
我相信这只是用 #16121 完成的
我仍然没有在@types/gulp@4
看到series()
和parallel()
@types/gulp@4
。
CLI version 2.0.1
Local version 4.0.0
我也有同样的问题。
当我运行任务时,出现此错误
TSError: ⨯ Unable to compile TypeScript:
gulpfile.ts(4,20): error TS2305: Module '"../../../PROJECT/node_modules/@types/gulp"' has no exported member 'series'.
gulpfile.ts(4,28): error TS2305: Module '"../../../PROJECT/node_modules/@types/gulp"' has no exported member 'parallel'.
如果我将串联和并联的类型从@types/undertaker 转移到@types/gulp,错误就会消失。
PS问题通过安装@types/undertaker解决
PSS 对不起,死灵法术。
最有用的评论
我仍然没有在
@types/gulp@4
看到series()
和parallel()
@types/gulp@4
。