- 当前 Bug 的表现(可附上截图)
工具栏和日志中报错
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'tsc' ]
2 info using npm@5.6.0
3 info using node@v10.0.0
4 verbose run-script [ 'pretsc', 'tsc', 'posttsc' ]
5 info lifecycle demo@1.0.1~pretsc: demo@1.0.1
6 info lifecycle demo@1.0.1~tsc: demo@1.0.1
7 verbose lifecycle demo@1.0.1~tsc: unsafe-perm in lifecycle true
8 verbose lifecycle demo@1.0.1~tsc: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/zhans.dong/data/workspace4/iCard/node_modules/.bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
9 verbose lifecycle demo@1.0.1~tsc: CWD: /Users/zhans.dong/data/workspace4/iCard
10 silly lifecycle demo@1.0.1~tsc: Args: [ '-c', 'node ./node_modules/typescript/lib/tsc.js' ]
11 silly lifecycle demo@1.0.1~tsc: Returned: code: 2 signal: null
12 info lifecycle demo@1.0.1~tsc: Failed to exec tsc script
13 verbose stack Error: demo@1.0.1 tsc: `node ./node_modules/typescript/lib/tsc.js`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:947:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:236:5)
14 verbose pkgid demo@1.0.1
15 verbose cwd /Users/zhans.dong/data/workspace4/iCard
16 verbose Darwin 18.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "tsc"
18 verbose node v10.0.0
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 2
22 error demo@1.0.1 tsc: `node ./node_modules/typescript/lib/tsc.js`
22 error Exit status 2
23 error Failed at the demo@1.0.1 tsc script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
- 预期表现
没有报错,出现正常二维码
- 复现路径
- 提供一个最简复现 Demo
新建自动生成的demo就有该错误。
这个问题怎么解决?
怎么解决
你好,请问最后是怎么解决的啊?
https://developers.weixin.qq.com/miniprogram/dev/devtools/nightly.html试下这个版本?我测试下没复现
我在检查一下 貌似我代码有问题
估计ts编辑不通过引起的,我有一些文件引用了老的js项目的共库文件
这个报错信息能改下使其一直留存么
现在是刷一下 就没了
调试器 -> Console Settings (齿轮) -> Preserve log (勾选上) 👌