-
Notifications
You must be signed in to change notification settings - Fork 455
Unable to show with ID #241
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
Comments
The nodejs warning problemThe nodejs warning problem is caused by the dependent package ░▒▓ ~/node_modules ▓▒░ npm list winston ░▒▓ ✔ base at 18:46:00 ▓▒░
supergui@ /Users/supergui
└─┬ [email protected]
└─┬ [email protected]
└── [email protected] It can be simply verified by require the package with node. # Add `--trace-warnings` to trace warning stack
node --trace-warnings
> require("winston")
> (node:77783) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
at emitCircularRequireWarning (node:internal/modules/cjs/loader:887:11)
at Object.get (node:internal/modules/cjs/loader:903:5)
at exports.setLevels (/Users/supergui/node_modules/winston/lib/winston/common.js:35:14)
at Object.<anonymous> (/Users/supergui/node_modules/winston/lib/winston.js:84:8)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18) The trace warning are helpful to retrieve the problem is caused by This problem is solved with the latest 2.x version of ░▒▓ ~/node_modules ▓▒░ npm install [email protected] ░▒▓ ✔ base at 18:52:16 ▓▒░
added 1 package, removed 25 packages, changed 2 packages, and audited 218 packages in 692ms Now we can see the ░▒▓ ~/node_modules ▓▒░ npm list ░▒▓ ✔ base at 18:52:30 ▓▒░
supergui@ /Users/supergui
├── [email protected]
└── [email protected] The warning message is gone now ░▒▓ ~/node_modules ▓▒░ node --trace-warnings ░▒▓ ✔ base at 18:52:32 ▓▒░
Welcome to Node.js v20.11.0.
Type ".help" for more information.
> require("winston") Fix leetcode-cliSo, we can fix the # Install ncu
npm i -g npm-check-updates
# Update all dependencies to latest minor version
# This will update the `[email protected]` to `[email protected]`
ncu -u
# Install all packages
npm install
# `winston` is indirect dependency.
# Must install the latest 2.x version of winston manually.
npm install [email protected] |
Without the warning message, however, the ░▒▓ ~/node_modules/leetcode-cli ▓▒░ leetcode show 1 ░▒▓ ✔ base at 19:13:06 ▓▒░
[ERROR] Problem not found! |
Got the problem, maybe I will raise a PR to fix this. keyword = Number(keyword) || keyword;
const problem = problems.find(function(x) {
return x.fid === keyword || x.name === keyword || x.slug === keyword;
}); As shown, the type of
|
Problem Summary
There is a warning message from nodejs when
leetcode
is launched, I have no idea how to fix it.The real problem is that it's unable to show with ID, I am not sure if it's related to the
Warning
problem.For example, I can show with keyword 'two-sum'
But fails with ID, with returns "Problem not found"
The same "Problem not found" is returned when submitting.
How to reproduce
Always.
Environment
The text was updated successfully, but these errors were encountered: