You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E:\project\wechaty-puppet-padlocal-demo>npm i
npm WARN [email protected] No repository field.
up to date in 1.859s
25 packages are looking for funding
run `npm fund` for details
E:\project\wechaty-puppet-padlocal-demo>node -v
v14.8.0
E:\project\wechaty-puppet-padlocal-demo>npm -v
6.14.7
E:\project\wechaty-puppet-padlocal-demo> .\node_modules\.bin\ts-node .\main.ts
E:\project\wechaty-puppet-padlocal-demo\node_modules\ts-node\src\index.ts:513
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
main.ts:11:17 - error TS2693: 'Wechaty' only refers to a type, but is being used as a value here.
11 const bot = new Wechaty({
~~~~~~~
at createTSError (E:\project\wechaty-puppet-padlocal-demo\node_modules\ts-node\src\index.ts:513:12)
at reportTSError (E:\project\wechaty-puppet-padlocal-demo\node_modules\ts-node\src\index.ts:517:19)
at getOutput (E:\project\wechaty-puppet-padlocal-demo\node_modules\ts-node\src\index.ts:752:36)
at Object.compile (E:\project\wechaty-puppet-padlocal-demo\node_modules\ts-node\src\index.ts:968:32)
at Module.m._compile (E:\project\wechaty-puppet-padlocal-demo\node_modules\ts-node\src\index.ts:1056:42)
at Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
at Object.require.extensions.<computed> [as .ts] (E:\project\wechaty-puppet-padlocal-demo\node_modules\ts-node\src\index.ts:1059:12)
at Module.load (internal/modules/cjs/loader.js:1100:32)
at Function.Module._load (internal/modules/cjs/loader.js:962:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
E:\project\wechaty-puppet-padlocal-demo>
main.ts:11:17 - error TS2693: 'Wechaty' only refers to a type, but is being used as a value here.
ts新手,不知如何解决这个问题呢,请指教
The text was updated successfully, but these errors were encountered:
问题复现
main.ts:11:17 - error TS2693: 'Wechaty' only refers to a type, but is being used as a value here.
ts新手,不知如何解决这个问题呢,请指教
The text was updated successfully, but these errors were encountered: