Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build is failing caused by promisify missing arg3 #1761

Closed
windmemory opened this issue Apr 25, 2019 · 2 comments
Closed

Build is failing caused by promisify missing arg3 #1761

windmemory opened this issue Apr 25, 2019 · 2 comments
Labels

Comments

@windmemory
Copy link
Member

Important:Please file the issue follow the template, or we won't help you to solve the problem.

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:
rm -rf package-lock.json
rm -rf node_modules
npm install
  1. Please search in FAQ List first, and make sure your problem has not been solved before.

  2. 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! [email protected] lint:ts: `tslint --project tsconfig.json && tsc --noEmit`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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! [email protected] 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 [email protected] 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:

  1. run npm install
  2. 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
> [email protected] dist /Users/yuangao/git/wechaty/wechaty
> npm run clean && npm run build


> [email protected] clean /Users/yuangao/git/wechaty/wechaty
> shx rm -fr dist/*


> [email protected] 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! [email protected] build: `tsc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! [email protected] dist: `npm run clean && npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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]

@huan huan closed this as completed in 09521cb Apr 25, 2019
@huan huan added the bug label Apr 25, 2019
@huan
Copy link
Member

huan commented Apr 26, 2019

Thanks for reporting with the description in detail!

@windmemory
Copy link
Member Author

Thanks for solving this problem so fast. You are the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants