getting-started
getting-started copied to clipboard
Token not found/unknown service
After following the guide to run wechaty for the first time in linux and windows, I was not successful. There are a few issues:
- Which token provider to use is not clear. Some links are circular, others are dead ends.
- Incorrect method for setting environment variables in windows ("set" should be "$env:" for powershell. powershell is was required for some steps. I cannot remember which)
- Step: "npm install wechaty-puppet-NAME" missing
These are the steps I took to install wechat on windows today:
Windows installation instructions
- Use powershell in administrator mode.
- Install node.js v12+
- Clone repo: git clone https://github.com/wechaty/wechaty-getting-started.git cd wechaty-getting-started
- npm install
- Install token service npm install wechaty-puppet-NAME (padlocal confirmed working)
- Get token from token service provider
- Set environment variables: $env:WECHATY_PUPPET="wechaty-puppet-NAME" $env:WECHATY_PUPPET_NAME_TOKEN="TOKEN" $env:WECHATY_LOG="verbose"
- npm start
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
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.
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!
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.
Great to hear from you, thank you very much!