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

wechaty is holding back wechaty-puppet & file-box #33

Closed
suntong opened this issue Feb 9, 2020 · 20 comments
Closed

wechaty is holding back wechaty-puppet & file-box #33

suntong opened this issue Feb 9, 2020 · 20 comments
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@suntong
Copy link

suntong commented Feb 9, 2020

My wechaty-puppet & file-box is not the latest version:

$ npm outdated
Package                Current  Wanted  Latest  Location
file-box                0.8.27  0.8.27  0.10.6  wechaty-getting-started
wechaty-puppet          0.16.1  0.16.1  0.18.3  wechaty-getting-started

If I force update my wechaty-puppet & file-box to the latest version, I'll get:

npm ERR! peer dep missing: file-box@^0.8.22, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: file-box@^0.8.22, required by wechaty-puppet-puppeteer@0.18.3
npm ERR! peer dep missing: wechaty-puppet@^0.16.1, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: wechaty-puppet@^0.16.1, required by wechaty-puppet-puppeteer@0.18.3
npm ERR! peer dep missing: file-box@^0.8.22, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: file-box@^0.8.22, required by wechaty-puppet-puppeteer@0.18.3
npm ERR! peer dep missing: wechaty-puppet@^0.16.1, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: wechaty-puppet@^0.16.1, required by wechaty-puppet-puppeteer@0.18.3

I think this should be a bug as wechaty-puppet-mock should not be holding back wechaty-puppet & file-box versions.

@suntong
Copy link
Author

suntong commented Feb 9, 2020

I think it'd be better that wechaty-puppet-mock always depending on the latest version of all package it depends on. Thus I recommend apply the following trick to its package.json file --

How to npm install and force latest version (permanently)?
https://stackoverflow.com/questions/48321723/

If OK, I can do the changes and make PR.

Please consider. thx.

@suntong
Copy link
Author

suntong commented Feb 9, 2020

the npm-check-updates package fixed it.

@suntong suntong closed this as completed Feb 9, 2020
@suntong
Copy link
Author

suntong commented Feb 9, 2020

Hmm... No!

the npm-check-updates package fixed npm outdated output (I got a clean output -- no outdated dependencies) but npm list --depth=0 is showing all previous outdated dependencies being missing.

So reopen for discussion...

@suntong suntong reopened this Feb 9, 2020
@suntong suntong changed the title wechaty-puppet-mock is holding back wechaty-puppet & file-box wechaty-puppet-mock and wechaty-puppet-puppeteer are holding back wechaty-puppet & file-box Feb 9, 2020
@huan
Copy link
Member

huan commented Feb 10, 2020

Thanks for pointing it l out.

A PR would be welcome!

@suntong
Copy link
Author

suntong commented Feb 23, 2020

The problem (of wechaty-puppet-mock and wechaty-puppet-puppeteer) has been fixed in wechaty@0.30.23 (sorry, only got around to visit this problem now), however, the problem persists :

$ npm outdated
Package         Current  Wanted  Latest  Location
eslint           5.16.0  5.16.0   6.8.0  wechaty-getting-started
file-box         0.10.6  0.10.6  0.12.3  wechaty-getting-started
wechaty-puppet   0.18.3  0.18.3  0.20.0  wechaty-getting-started

Checked and confirmed that it is wechaty@0.30.23 that is holding them back:

$ grep -E 'file-box|wechaty-puppet' node_modules/wechaty/package.json 
    "wechaty-puppet-install": "dist/bin/puppet-install.js",
    "file-box": "^0.10.6",
    "wechaty-puppet": "^0.18.3",
    "wechaty-puppet-mock": "^0.16.1"

So changing the title and submitting PR (to force latest version permanently).

@suntong suntong changed the title wechaty-puppet-mock and wechaty-puppet-puppeteer are holding back wechaty-puppet & file-box wechaty is holding back wechaty-puppet & file-box Feb 23, 2020
@suntong
Copy link
Author

suntong commented Feb 23, 2020

Hmm.. my "fix" doesn't even work locally, so there won't be any PR from me...

@huan
Copy link
Member

huan commented Feb 23, 2020

I try to reproduce your description but I failed.

with the latest https://github.com/wechaty/wechaty-getting-started repo:

$ cd wechaty-getting-started/
$ git pull
$ rm -fr node_modules/
$ npm install
$ npm outdated
Package                Current  Wanted  Latest  Location
@chatie/eslint-config   0.6.20  0.6.20   0.8.1  wechaty-getting-started
@chatie/tsconfig         0.6.1   0.6.1   0.8.0  wechaty-getting-started
check-node-version       3.3.0   3.3.0   4.0.2  wechaty-getting-started
cross-env                5.2.1   5.2.1   7.0.0  wechaty-getting-started

Everything looks good for Wechaty.

Could you try again and try to figure out what's the difference between your result with me?

huan added a commit to wechaty/getting-started that referenced this issue Feb 23, 2020
@huan
Copy link
Member

huan commented Feb 23, 2020

And I have just fixed all the outdated npm dependencies after my last commit.

npm outdated will get nothing now.

@huan huan added the question Further information is requested label Feb 23, 2020
@suntong
Copy link
Author

suntong commented Feb 23, 2020

Thanks for the fixes/updates @huan ,

Could you run the following command under your wechaty-getting-started/ folder please?

Here are the commands and my outputs:

$ npm ls wechaty
wechaty-getting-started@0.1.19 /path/to/it
`-- wechaty@0.30.23 

$ grep -E 'file-box|wechaty-puppet' node_modules/wechaty/package.json 
    "wechaty-puppet-install": "dist/bin/puppet-install.js",
    "file-box": "^0.10.6",
    "wechaty-puppet": "^0.18.3",
    "wechaty-puppet-mock": "^0.16.1"

@huan
Copy link
Member

huan commented Feb 23, 2020

Here's my output:

┌ huan@huan-home:~/chatie/wechaty-getting-started [09:12:38] tty:[1] jobs:[0]
└ (master) $ npm ls wechaty
wechaty-getting-started@0.1.23 /home/huan/chatie/wechaty-getting-started
└── wechaty@0.30.23 

┌ huan@huan-home:~/chatie/wechaty-getting-started [09:12:40] tty:[1] jobs:[0]
└ (master) $ grep -E 'file-box|wechaty-puppet' node_modules/wechaty/package.json 
    "wechaty-puppet-install": "dist/bin/puppet-install.js",
    "file-box": "^0.10.6",
    "wechaty-puppet": "^0.18.3",
    "wechaty-puppet-mock": "^0.16.1"
┌ huan@huan-home:~/chatie/wechaty-getting-started [09:12:47] tty:[1] jobs:[0]
└ (master) $ npm outdated
┌ huan@huan-home:~/chatie/wechaty-getting-started [09:13:04] tty:[1] jobs:[0]
└ (master) $

So mine is the same with yours. Are there any problems?

@suntong
Copy link
Author

suntong commented Feb 23, 2020

Oh, I was trying to use npm update to do the minimum downloading and upgrading, and apparently that, gave me the trouble as above. rm -fr node_modules/ and npm install did the trick to have a clean npm outdated output.

However, maybe you weren't testing wechaty-getting-started with wechaty-puppet-mock & wechaty-puppet-puppeteer?

Please run the following commands under your wechaty-getting-started/ folder and compare with my outputs:

$ npm list wechaty-puppet-mock
wechaty-getting-started@0.1.19 /...
`-- wechaty-puppet-mock@0.16.1 

$ npm list wechaty-puppet-puppeteer
wechaty-getting-started@0.1.19 /...
`-- wechaty-puppet-puppeteer@0.18.3 

$ npm list > /dev/null
npm ERR! peer dep missing: file-box@^0.8.22, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: file-box@^0.8.22, required by wechaty-puppet-puppeteer@0.18.3
npm ERR! peer dep missing: wechaty-puppet@^0.16.1, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: wechaty-puppet@^0.16.1, required by wechaty-puppet-puppeteer@0.18.3
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin-tslint@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/parser@1.13.0
npm ERR! missing: file-box@^0.10.6, required by wechaty@0.30.23
npm ERR! missing: wechaty-puppet@^0.18.3, required by wechaty@0.30.23

thx

@huan
Copy link
Member

huan commented Feb 23, 2020

The following is my output:

┌ huan@huan-home:~/chatie/wechaty-getting-started [09:50:06] tty:[1] jobs:[0]
└ (master) $ npm list wechaty-puppet-mock
wechaty-getting-started@0.1.23 /home/huan/chatie/wechaty-getting-started
└── (empty)

┌ huan@huan-home:~/chatie/wechaty-getting-started [09:50:08] tty:[1] jobs:[0]
└ (master) $ npm list wechaty-puppet-puppeteer
wechaty-getting-started@0.1.23 /home/huan/chatie/wechaty-getting-started
└── (empty)

┌ huan@huan-home:~/chatie/wechaty-getting-started [09:50:12] tty:[1] jobs:[0]
└ (master) $ npm list > /dev/null
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin-tslint@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/parser@1.13.0
┌ huan@huan-home:~/chatie/wechaty-getting-started [09:50:19] tty:[1] jobs:[0]
└ (master) $ 

huan added a commit to wechaty/puppet-wechat that referenced this issue Feb 23, 2020
huan added a commit to wechaty/puppet-wechat that referenced this issue Feb 23, 2020
@suntong
Copy link
Author

suntong commented Feb 23, 2020

Yeah, I thought so. Please install wechaty-puppet-mock & wechaty-puppet-puppeteer in it, as that's another two ways of testing wechaty-getting-started, then retry the above command again. I'd think that you'd get the same result as mine, i.e., the dependency versions in wechaty-puppet-mock & wechaty-puppet-puppeteer need to be fixed as well (contrary to what I thought at the beginning of today).

[update] Ops, just saw that you've already updated the dependency versions in wechaty-puppet-mock and wechaty-puppet-puppeteer might be on the way...

@huan
Copy link
Member

huan commented Feb 23, 2020

I understand your situation now.

Does this is a problem that blocks anything you want to do?

If it does, please try to add a unit test to fail with this case by sending a Pull Request, then I'll try to fix it.

If it does not, please wait to use the next version of wechaty (0.32), I believe then we will fix this warning.

@suntong
Copy link
Author

suntong commented Feb 23, 2020

Sorry @huan, I'm not a JS developer at all -- I have no clue how to design a unit test to fail with this case. I'm only trying to upgrade my wechaty to the latest version. I'll wait instead.

@huan
Copy link
Member

huan commented Feb 23, 2020

No problem. I'll link your issue to another related one and close this for better tracking.

Merge to wechaty/wechaty#1914

@huan huan closed this as completed Feb 23, 2020
@huan huan added the duplicate This issue or pull request already exists label Feb 23, 2020
@suntong
Copy link
Author

suntong commented Feb 23, 2020

Hmm... I was hoping that the issue get closed when it is actually fixed.
Would you drop a line here when I can try again please @huan?
thanks!

@huan
Copy link
Member

huan commented Feb 23, 2020

For this file-box related issue: I believe it's already been fixed with the @next version (v0.31.20 or above).

Please try to npm install wechaty@next and let me know if you still have any file-box related issues.

@suntong
Copy link
Author

suntong commented Feb 23, 2020

Hmm... this is what I got:

$ npm list > /dev/null
npm ERR! peer dep missing: file-box@^0.8.22, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: file-box@^0.10.6, required by wechaty-puppet-puppeteer@0.18.6
npm ERR! peer dep missing: wechaty-puppet@^0.16.1, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: wechaty-puppet@^0.18.3, required by wechaty-puppet-puppeteer@0.18.6
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin-tslint@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/parser@1.13.0
npm ERR! peer dep missing: eslint@>= 4.12.1, required by babel-eslint@10.0.3
npm ERR! peer dep missing: eslint@>=5.0.0, required by eslint-config-standard@12.0.0
npm ERR! peer dep missing: eslint@2.x - 6.x, required by eslint-plugin-import@2.20.1
npm ERR! peer dep missing: eslint@>=5.16.0, required by eslint-plugin-node@9.2.0
npm ERR! peer dep missing: eslint@>=5.0.0, required by eslint-plugin-standard@4.0.1
npm ERR! peer dep missing: eslint@*, required by @typescript-eslint/experimental-utils@1.13.0
npm ERR! peer dep missing: eslint@*, required by @typescript-eslint/experimental-utils@1.13.0
npm ERR! peer dep missing: eslint@*, required by @typescript-eslint/experimental-utils@1.13.0
npm ERR! peer dep missing: eslint@>=4.19.1, required by eslint-plugin-es@1.4.1
npm ERR! peer dep missing: wechaty-puppet@^0.16.1, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: wechaty-puppet@^0.18.3, required by wechaty-puppet-puppeteer@0.18.6
npm ERR! peer dep missing: file-box@^0.8.22, required by wechaty-puppet-mock@0.16.1
npm ERR! peer dep missing: file-box@^0.10.6, required by wechaty-puppet-puppeteer@0.18.6

But both wechaty-puppet-mock & wechaty-puppet-puppeteer starts fine though...

@huan
Copy link
Member

huan commented Feb 23, 2020

  1. Yes, all your puppet will be fine, don't worry about that.
  2. I believe you have some version related problems.
  3. The wechaty@0.32 will reduce those warning messages a lot.

TL;DR: you can totally ignore those messages if your puppets start fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants