Build is failing caused by promisify missing arg3
Created by: windmemory
Important:Please file the issue follow the template, or we won't help you to solve the problem.
0. Report Issue Guide
- Please run the following command and check whether the problem has been fixed:
rm -rf package-lock.json
rm -rf node_modules
npm install
-
Please search in FAQ List first, and make sure your problem has not been solved before.
-
Please search in the issue first, and make sure your problem had not been reported before
1. Versions
-
What is your wechaty version? Answer: 0.25.11
-
Which puppet are you using for wechaty? (padchat/puppeteer/padpro/...) Answer: padpro
-
What is your wechaty-puppet-XXX(padchat/puppeteer/) version? Answer: 0.0.57
-
What is your node version? (run
node --version
) Answer: 10.15.3 -
What os are you using Answer: mac osx
2. Describe the bug
The build is failing, and I checked the log, complaining about missing arg3
in promisify
.
I tried in my local machine, it is caused by ts type check, when I run npm run dist
in the wechaty folder, it will show the same error as below.
scripts/update-license.ts(133,9): error TS2554: Expected 3 arguments, but got 2.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wechaty@0.25.6 lint:ts: `tslint --project tsconfig.json && tsc --noEmit`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wechaty@0.25.6 lint:ts 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! /root/.npm/_logs/2019-04-20T03_11_45_594Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wechaty@0.25.6 lint: `npm run check-node-version && npm run lint:ts && npm run lint:sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wechaty@0.25.6 lint 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! /root/.npm/_logs/2019-04-20T03_11_45_608Z-debug.log
npm ERR! Test failed. See above for more details.
The command '/bin/sh -c npm test' returned a non-zero code: 1
3. To Reproduce
This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.
Steps to reproduce the behavior:
- run
npm install
- run
npm run dist
4. Expected behavior
npm run dist
finished without any errors.
5. Actual behavior
Errors thrown out as listed above.
6. Full Output Logs
Set env WECHATY_LOG=silly
in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)
We need full log instead of log screenshot or log fragments!
Show Logs
> wechaty@0.25.11 dist /Users/yuangao/git/wechaty/wechaty
> npm run clean && npm run build
> wechaty@0.25.11 clean /Users/yuangao/git/wechaty/wechaty
> shx rm -fr dist/*
> wechaty@0.25.11 build /Users/yuangao/git/wechaty/wechaty
> tsc
scripts/update-license.ts:133:9 - error TS2554: Expected 3 arguments, but got 2.
133 await promisify(linkCallback)(tmpFile, file)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@types/node/util.d.ts:101:167
101 function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
~~~~~~~~
An argument for 'arg3' was not provided.
Found 2 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wechaty@0.25.11 build: `tsc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wechaty@0.25.11 build 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/yuangao/.npm/_logs/2019-04-25T15_30_57_143Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wechaty@0.25.11 dist: `npm run clean && npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wechaty@0.25.11 dist 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/yuangao/.npm/_logs/2019-04-25T15_30_57_162Z-debug.log
7. Additional context
Add any other context about the problem here.
[bug]