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
774 stars 342 forks source link

Run npm start with error #248

Closed guguji5 closed 2 years ago

guguji5 commented 2 years ago

Important:Please file the issue follow the template, or we won't help you to solve the problem.

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:

    rm -rf package-lock.json
    rm -rf node_modules
    npm install
  2. Please search in FAQ List first, and make sure your problem has not been solved before.

  3. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

2. Describe the bug

surprisedly, I can't run the npm start successfully after struggling several hours.

3. To Reproduce

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

Steps to reproduce the behavior:

  1. git clone https://github.com/wechaty/getting-started.git
  2. cd getting-started
  3. npm install
  4. export WECHATY_LOG=verbose
  5. export WECHATY_PUPPET=wechaty-puppet-wechat
  6. npm start

4. Expected behavior

Of course,I expect the qrcode

5. Actual behavior

(base) bogon:getting-started sunny$ npm start

> wechaty-getting-started@1.11.3 start
> cross-env NODE_OPTIONS="--no-warnings --loader=ts-node/esm" node examples/ding-dong-bot.ts

node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/Users/sunny/Javascript/getting-started/node_modules/ts-node/esm' is not supported resolving ES modules imported from /Users/sunny/Javascript/getting-started/
    at new NodeError (node:internal/errors:371:5)
    at finalizeResolution (node:internal/modules/esm/resolve:414:17)
    at moduleResolve (node:internal/modules/esm/resolve:981:10)
    at defaultResolve (node:internal/modules/esm/resolve:1078:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
    at ESMLoader.import (node:internal/modules/esm/loader:332:22)
    at initializeLoader (node:internal/process/esm_loader:74:49)
    at loadESM (node:internal/process/esm_loader:87:11)
    at runMainESM (node:internal/modules/run_main:51:21) {
  code: 'ERR_UNSUPPORTED_DIR_IMPORT',
  url: 'file:///Users/sunny/Javascript/getting-started/node_modules/ts-node/esm'
}

6. Full Output Logs

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs ```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: ```

7. Additional context

Add any other context about the problem here. 太难了,一万多star的项目,为何跑不起来,我太难了 [bug]

ChinaMars521 commented 2 years ago

我也跑不起来,去他说那个平台也打不开,demo 扔到编辑器上就爆红不知道他怎们写的

ChinaMars521 commented 2 years ago

image

ChinaMars521 commented 2 years ago

npm i 出现错误我也服了不能排除下代码吗我们也没白嫖

guguji5 commented 2 years ago

哈哈,似乎已经没人维护了,,别打微信的注意了,

npm i 出现错误我也服了不能排除下代码吗我们也没白嫖

huan commented 2 years ago

Close this issue because it's off topic.

Learn how to getting started successfully by reading the official docs at https://wechaty.js.org/docs/getting-started/