wechaty / getting-started

A Starter Project Template for Wechaty works out-of-the-box
https://gitpod.io/#https://github.com/wechaty/wechaty-getting-started
Apache License 2.0
779 stars 344 forks source link

Token not found/unknown service #172

Open corporal-clegg87 opened 3 years ago

corporal-clegg87 commented 3 years ago

After following the guide to run wechaty for the first time in linux and windows, I was not successful. There are a few issues:

These are the steps I took to install wechat on windows today:

Windows installation instructions

  1. Use powershell in administrator mode.
    1. Install node.js v12+
    2. Clone repo: git clone https://github.com/wechaty/wechaty-getting-started.git cd wechaty-getting-started
    3. npm install
    4. Install token service npm install wechaty-puppet-NAME (padlocal confirmed working)
    5. Get token from token service provider
    6. Set environment variables: $env:WECHATY_PUPPET="wechaty-puppet-NAME" $env:WECHATY_PUPPET_NAME_TOKEN="TOKEN" $env:WECHATY_LOG="verbose"
    7. npm start
corporal-clegg87 commented 3 years ago

Now the next problem is that I have already paid for a token from paimon. When I try to set paimon as the puppet via $env:WECHATY_PUPPET="wechaty-puppet-paimon" I get npm module not supported. This is the same error which was fixed for padmon by running npm install wechaty-puppet-padmon . Running the npm install wechaty-puppet-paimon yields NOT FOUND

huan commented 3 years ago

There's no such puppet named wechaty-puppet-paimon because the paimon is a Puppet Service instead of a Puppet Provider.

Please try the following command if you are using the paimon puppet service:

export WECHATY_PUPPET=wechaty-puppet-service
export WECHATY_PUPPET_SERVICE_TOKEN=puppet_paimon_XXX

Then I believe your Wechaty bot will be able to start with the paimon service.

huan commented 3 years ago

Hello, after re-read your issue, I believe that our docs should be improved and you know how to make it work under Windows/PowerShell.

It would be great if you can send PRs to fix what you found is not right in our docs, thank you very much!

corporal-clegg87 commented 3 years ago

sorry, i just saw this response now and don't remember exactly what I was working with back then. i will have a look over the coming days.

huan commented 3 years ago

Great to hear from you, thank you very much!