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

Proper wechaty and its dependency installation #1225

Closed
suntong opened this issue May 23, 2018 · 3 comments
Closed

Proper wechaty and its dependency installation #1225

suntong opened this issue May 23, 2018 · 3 comments

Comments

@suntong
Copy link
Contributor

suntong commented May 23, 2018

In order to dup issue #1222 myself, I tried to do the wechaty installation to a second brand new machine, and here is what I got:

$ npm install puppeteer

> puppeteer@1.4.0 install /path/to/my/node_modules/puppeteer
> node install.js

Downloading Chromium r555668 - 98 Mb [====================] 100% 0.0s 
Chromium downloaded to /path/to/my/node_modules/puppeteer/.local-chromium/linux-555668
npm WARN rx-queue@0.3.1 requires a peer of rxjs@^5 but none is installed. You must install peer dependencies yourself.

+ concat-map@0.0.1
+ puppeteer@1.4.0
added 4 packages in 194.714s

$ npm install rxjs
npm WARN rx-queue@0.3.1 requires a peer of rxjs@^5 but none is installed. You must install peer dependencies yourself.

+ rxjs@6.2.0
updated 1 package in 2.766s

I.e., I installed the rxjs peer dependencies myself, but it didn't solve the problem.

In order to solve the problem, I have to do

$ npm install rxjs@5
+ rxjs@5.5.11
added 2 packages and updated 1 package in 5.001s

Now things are OK.
However, when I tried to install wechaty next I get:

$ npm install wechaty@0.14
npm WARN rx-queue@0.3.14 requires a peer of rxjs@^6 but none is installed. You must install peer dependencies yourself.

+ wechaty@0.14.4
added 4 packages, removed 9 packages and updated 27 packages in 4.627s

I.e., wechaty's rxjs dependency requirement (v6) is conflicting with puppeteer's (v5).

This might not seem to be a big deal, but this rxjs thing is breaking the old test code that I had:

$ node index.js 
Error: Cannot find module 'rxjs-compat/Observable'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/path/to/my/node_modules/rxjs/Observable.js:6:10)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at /lfs/cache12/my-caches/repo/gitwork/bbxpt/rpn/autoarch/node_modules/rx-queue/bundles/rx-queue.umd.js:40:104
    at Object.<anonymous> (/path/to/my/node_modules/rx-queue/bundles/rx-queue.umd.js:43:2)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/path/to/my/node_modules/wechaty/dist/src/puppet-web/puppet-web.js:30:20)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/path/to/my/node_modules/wechaty/dist/src/puppet-web/index.js:27:22)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/path/to/my/node_modules/wechaty/dist/src/wechaty.js:36:12)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/path/to/my/node_modules/wechaty/dist/src/contact.js:33:19)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/path/to/my/node_modules/wechaty/dist/index.js:7:17)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/path/to/my/index.js:40:21)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)
    at startup (internal/bootstrap/node.js:228:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:576:3)
@huan
Copy link
Member

huan commented May 23, 2018

I'd like to suggest you try a REAL fresh install:

rm -fr node_modules
rm -f package-lock.json

npm install wechaty

@suntong suntong changed the title wechaty's rxjs dependency requirement conflicts with puppeteer's Proper wechaty and its dependency installation May 23, 2018
@suntong
Copy link
Contributor Author

suntong commented May 23, 2018

Oh, OK. I gave it a try, and this is what I get for now.

$ rm -fr node_modules

$ rm -f package-lock.json

$ npm install wechaty

> puppeteer@1.4.0 install /lfs/workv/repo/gitwork/bbxpt/rpn/autoarch/node_modules/wechaty/node_modules/puppeteer
> node install.js

Downloading Chromium r555668 - 98 Mb [====================] 100% 0.0s 
Chromium downloaded to /lfs/workv/repo/gitwork/bbxpt/rpn/autoarch/node_modules/wechaty/node_modules/puppeteer/.local-chromium/linux-555668
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN rx-queue@0.3.14 requires a peer of rxjs@^6 but none is installed. You must install peer dependencies yourself.

+ wechaty@0.14.4
added 145 packages in 193.516s

$ node index.js
internal/modules/cjs/loader.js:573
    throw err;
    ^

Error: Cannot find module 'finis'

$ npm outdated
Package     Current  Wanted  Latest  Location
concat-map  MISSING   0.0.1   0.0.1  autoarch
puppeteer   MISSING   1.4.0   1.4.0  autoarch
rxjs        MISSING  5.5.11   6.2.0  autoarch

$ npm install 

> puppeteer@1.4.0 install /lfs/workv/repo/gitwork/bbxpt/rpn/autoarch/node_modules/puppeteer
> node install.js

Downloading Chromium r555668 - 98 Mb [====================] 100% 0.0s 
Chromium downloaded to /lfs/workv/repo/gitwork/bbxpt/rpn/autoarch/node_modules/puppeteer/.local-chromium/linux-555668
npm WARN rx-queue@0.3.14 requires a peer of rxjs@^6 but none is installed. You must install peer dependencies yourself.

added 113 packages in 193.778s

$ npm outdated
Package  Current  Wanted  Latest  Location
rxjs      5.5.11  5.5.11   6.2.0  autoarch

$ node index.js
internal/modules/cjs/loader.js:573
    throw err;
    ^

Error: Cannot find module 'finis'

$ npm install finis
npm WARN rx-queue@0.3.14 requires a peer of rxjs@^6 but none is installed. You must install peer dependencies yourself.

+ finis@0.4.2
added 1 package in 2.211s

$ ts-node index.js
08:22:36 INFO Wechaty v0.14.4 starting...

Yep, it works. Just the issue #1222 is still yet. Thx.

@suntong suntong closed this as completed May 23, 2018
@suntong
Copy link
Contributor Author

suntong commented May 23, 2018

why puppeteer has to be installed twice? It's always like that. Is it a nodejs thing that I should ask elsewhere, or..?

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

No branches or pull requests

2 participants