小程序
小游戏
企业微信
微信支付
扫描小程序码分享
编译不通过 什么原因呢
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
对 输入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
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
建议更新一下工具试试呢
我知道了
执行tsc的时候默认使用 /usr/local/bin/tsc
修改package.json
"scripts": {
"scripts"
: {
"tsc": "./node_modules/typescript/bin/tsc",
"tsc"
:
"./node_modules/typescript/bin/tsc"
,
"compile": "./node_modules/typescript/bin/tsc"
"compile"
}
是使用了 TypeScript 的项目?在终端命令行打开这个目录,运行 npm run compile 或者 tsc 试下呢
急求解答:https://developers.weixin.qq.com/community/develop/doc/000ceca09fcee0e925f79728551800
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
对 输入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
建议更新一下工具试试呢
我知道了
执行tsc的时候默认使用 /usr/local/bin/tsc
修改package.json
"scripts"
: {
"tsc"
:
"./node_modules/typescript/bin/tsc"
,
"compile"
:
"./node_modules/typescript/bin/tsc"
}
是使用了 TypeScript 的项目?在终端命令行打开这个目录,运行 npm run compile 或者 tsc 试下呢
急求解答:https://developers.weixin.qq.com/community/develop/doc/000ceca09fcee0e925f79728551800