Skip to content
Huan LI edited this page Aug 18, 2018 · 1 revision

1. 'puppet' are incompatible.(version mismatch)

Types of property 'puppet' are incompatible. error TS2345: Argument of type '{ profile: string; puppet: PuppetXXX; }' is not assignable to parameter of type 'WechatyOptions'.

error TS2345: Argument of type '{ profile: string; puppet: PuppetPuppeteer; }' is not assignable to parameter of type 'WechatyOptions'.
  Types of property 'puppet' are incompatible.
    Type 'PuppetPuppeteer' is not assignable to type '"default" | "wechaty-puppet-puppeteer" | "padchat" | "wechaty-puppet-ioscat" | "wechaty-puppet-mock" | "wechaty-puppet-padchat" | "wechaty-puppet-wechat4u" | Puppet | undefined'.
      Type 'PuppetPuppeteer' is not assignable to type 'Puppet'.
        Property 'options' is protected but type 'PuppetPuppeteer' is not a class derived from 'Puppet'.

The above error message identified that there's more than one wechaty-puppet module was installed.

To list all the wechaty-puppet modules that installed, use a npm ls wechaty-puppet command to list:

$ npm ls wechaty-puppet
[email protected] wechaty-puppet-xxx
├─┬ [email protected]
│ └── [email protected] 
└── [email protected] 

According to the above output, we can know that the two version is 0.13.18 and 0.14.1, which is conflicted and should be fix.

To fix it, we have two options:

  1. upgrade wechaty that requires the [email protected], or
  2. downgrade to [email protected] in our local package.json.
Clone this wiki locally