wechaty / wechaty

Conversational RPA SDK for Chatbot Makers. Join our Discord: https://discord.gg/7q8NBZbQzt
https://wechaty.js.org
Apache License 2.0
19.57k stars 2.55k forks source link

js能正常跑起来,但是 wechaty 包依赖有警告 #2639

Open dong-lufei opened 4 months ago

dong-lufei commented 4 months ago
$ npm i wechaty       
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
dosubot[bot] commented 4 months ago

🤖

嗨,@dong-lufei!很高兴再次见到你。希望你一切都好!

这些警告信息是由于一些依赖包已经被废弃或者需要更新。这并不会影响wechaty的正常运行,但是为了避免可能的问题,你可以考虑更新这些依赖包。

  1. har-validator@5.1.5:这个库已经不再被支持,你可以考虑移除这个依赖或者寻找替代的库。

  2. cuid@2.1.8:这个库已经被废弃,建议使用@paralleldrive/cuid2替代。

  3. request@2.88.2:这个库已经被废弃,你可以在这个链接查看更多信息:https://github.com/request/request/issues/3142

  4. uuid@3.4.0:建议更新到7或更高的版本。旧版本可能在某些情况下使用Math.random(),这可能会有问题。你可以在这个链接查看更多信息:https://v8.dev/blog/math-random

你可以通过运行npm outdated命令来查看哪些包需要更新,然后通过运行npm update来更新这些包。如果某个包不能被自动更新,你可能需要手动更新。

如果你在中国,这些警告可能是由于GFW(Great Fire Wall)的网络审查导致的。你可以尝试使用淘宝的NPM镜像来解决这个问题。具体方法可以参考上下文中的解答。

如果这些解决方案不能解决你的问题,那么可能是由于其他原因导致的,这些原因没有在提供的上下文中涵盖。

Sources

#### About Dosu This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.