-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation Warning: lodash.get is deprecated, use optional chaining (?.) instead #3634
Comments
mineflayer doesn't import this package, the issue is upstream and should be opened there instead |
Well that's the problem, give the real location and it can be fixed |
I built https://v0-npm-package-path-visualizer-alrf2c.vercel.app/ with v0 to find the path |
Chatgpt take PrismarineJS/node-minecraft-protocol#1390 |
Well I really want to just ask an agent to do this stuff end to end |
Fixed |
The [FAQ](https://github.com/PrismarineJS/mineflayer/blob/master/docs/FAQ.md) doesn't contain a resolution to my issue
Versions
Detailed description of problem
I'm encountering a deprecation warning in the mineflayer library due to the usage of the deprecated lodash.get package. The warning indicates that lodash.get is no longer maintained and should be replaced with optional chaining (?.), as it is the modern, preferred method for accessing deeply nested properties in JavaScript.
Warning Message:
What I'm building:
I'm using mineflayer to create a Minecraft bot, and during the installation and usage of the library, I receive the deprecation warning about lodash.get. This affects the smooth running of my project as I want to ensure my dependencies are up-to-date and do not use deprecated packages.
What did you try yet?
I have tried updating mineflayer to the latest version, but the deprecation warning persists because lodash.get is still in use within the codebase.
Your current code
Expected behavior
I expect the deprecation warning to be resolved by replacing lodash.get with optional chaining (?.). For example:
Additional context
The lodash.get package is deprecated, and its usage can be replaced with the modern optional chaining operator (?.) in the JavaScript codebase.
The text was updated successfully, but these errors were encountered: