npm ERR! code ELIFECYCLE

发布于 6 年前作者 ping1111570 次浏览最后编辑 6 年前来自 ask

编译不通过 什么原因呢

2 回复
zoulei
zoulei1 楼6 年前

是使用了 TypeScript 的项目?在终端命令行打开这个目录,运行 npm run compile 或者 tsc 试下呢

fangmao
fangmao2 楼4 年前

对 输入npm run compile

error TS2318: Cannot find global type ‘CallableFunction’.

error TS2318: Cannot find global type ‘NewableFunction’.

Found 2 errors.

npm ERR! code ELIFECYCLE

npm ERR! errno 2

npm ERR! welfareHub@1.0.0 compile: `tsc`

npm ERR! Exit status 2

npm ERR!

npm ERR! Failed at the welfareHub@1.0.0 compile script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/zhangxiaolong/.npm/_logs/2019-01-11T07_20_07_330Z-debug.log