Closed secreter closed 2 years ago
Wechaty v1.x requires Node.js v16+ & NPM 7+
Please upgrade your Node.js to meet the requirement.
See:
same promblem
node -v
v16.15.0
npm -v
8.5.5
{
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"wechaty": "^1.18.1"
}
}
s-node ./src/index.ts
node_modules/.pnpm/wechaty-puppet-service@1.18.2_d42f159a7024166bfd1a952a1deb1e77/node_modules/wechaty-puppet-service/dist/cjs/src/client/puppet-service.js:1165
timestamp ??= 0;
^^^
SyntaxError: Unexpected token '??='
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/node_modules/.pnpm/wechaty-puppet-service@1.18.2_d42f159a7024166bfd1a952a1deb1e77/node_modules/wechaty-puppet-service/src/mod.ts:4:1)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
@xmsz If you believe you are using Node.js v16+, then a reproducible repo would be helpful.
Or you can clone this repo and run npm start
, it will run without any problem.
My problom... it works fine
Great to know that,I hoped you enjoy your chatbot soon!
Great to know that,I hoped you enjoy your chatbot soon!
hope so, but i met some problem
(in Chinese)
现在只能先把wechaty降到0.x 然后看看能不能跑
puppet-service 的cjs 包有没有编译的语法,导致执行不了,最新的好多版本都有这个问题。