wechaty/docusaurus

Error running Wechaty on Gitpod

Open

#920 opened on Jun 4, 2021

View on GitHub
 (5 comments) (0 reactions) (0 assignees)MDX (342 forks)auto 404
GSoD 2021bughelp wantedtutorials

Repository metrics

Stars
 (119 stars)
PR merge metrics
 (PR metrics pending)

Description

Running the Ding Dong bot on Gitpod from the link given in the Quick Start page under Tutorials gives error. Have added the entire console output below:

> wechaty-getting-started@0.11.1 start:wechat:web /workspace/wechaty-getting-started
> cross-env WECHATY_LOG=verbose WECHATY_PUPPET=wechaty-puppet-wechat npm start


> wechaty-getting-started@0.11.1 start /workspace/wechaty-getting-started
> ts-node examples/ding-dong-bot.ts

07:39:39 INFO Config registering process.on("unhandledRejection") for development/debug
07:39:39 VERB Config constructor()
07:39:39 ERR Config ###########################
07:39:39 ERR Config uncaughtException: /workspace/wechaty-getting-started/node_modules/wechaty-puppet-service/dist/src/config.js:67
        ?? 'https://api.chatie.io';
         ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/wechaty-puppet-service/src/client/puppet-service.ts:110:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/wechaty-puppet-service/src/mod.ts:1:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/wechaty/src/io-client.ts:26:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/wechaty/src/mod.ts:66:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/examples/ding-dong-bot.ts:5:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Module.m._compile (/workspace/wechaty-getting-started/node_modules/ts-node/src/index.ts:1295:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Object.require.extensions.<computed> [as .ts] (/workspace/wechaty-getting-started/node_modules/ts-node/src/index.ts:1298:12)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at main (/workspace/wechaty-getting-started/node_modules/ts-node/src/bin.ts:246:14)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/ts-node/src/bin.ts:382:3)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 uncaughtException
07:39:39 ERR Config ###########################
/workspace/wechaty-getting-started/node_modules/wechaty-puppet-service/dist/src/config.js:67
        ?? 'https://api.chatie.io';
         ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/wechaty-puppet-service/src/client/puppet-service.ts:110:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/wechaty-puppet-service/src/mod.ts:1:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/wechaty/src/io-client.ts:26:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/wechaty/src/mod.ts:66:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/workspace/wechaty-getting-started/examples/ding-dong-bot.ts:5:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Module.m._compile (/workspace/wechaty-getting-started/node_modules/ts-node/src/index.ts:1295:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Object.require.extensions.<computed> [as .ts] (/workspace/wechaty-getting-started/node_modules/ts-node/src/index.ts:1298:12)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at main (/workspace/wechaty-getting-started/node_modules/ts-node/src/bin.ts:246:14)
    at Object.<anonymous> (/workspace/wechaty-getting-started/node_modules/ts-node/src/bin.ts:382:3)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wechaty-getting-started@0.11.1 start: `ts-node examples/ding-dong-bot.ts`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the wechaty-getting-started@0.11.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitpod/.npm/_logs/2021-06-04T07_39_39_602Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wechaty-getting-started@0.11.1 start:wechat:web: `cross-env WECHATY_LOG=verbose WECHATY_PUPPET=wechaty-puppet-wechat npm start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the wechaty-getting-started@0.11.1 start:wechat:web script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitpod/.npm/_logs/2021-06-04T07_39_39_620Z-debug.log

Screenshot 2021-06-04 at 1 46 40 PM

I believe it is caused due to some of the node modules, @huan let us know how to fix this.

Contributor guide