LeetCode-OpenSource / vscode-leetcode

Solve LeetCode problems in VS Code
https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-leetcode
MIT License
8.23k stars 651 forks source link

command node .vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/bin/leetcode",show,82,-x" failed with exit code "1". #863

Open wangyerdfz opened 1 year ago

wangyerdfz commented 1 year ago

šŸ› Bug Report

this bug showed after I updated vscode to 1.75.1

double click any problem. leet code would still work, but it says

"""

Command "node "/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/bin/leetcode",show,76,-x" failed with exit code "1".

After running the command in bash I think there's probably an error somewhere in the script since It's running "leetcode," instead of "leetcode", which prompts the error? see the following

code-0.18.1/node_modules/vsc-leetcode-cli/bin/leetcode", show,76,-x node:internal/modules/cjs/loader:1063 throw err; ^

Error: Cannot find module '/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/bin/leetcode,' at Module._resolveFilename (node:internal/modules/cjs/loader:1060:15) at Module._load (node:internal/modules/cjs/loader:905:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

"""

with 76 being the problem number. but really any number would do

To Reproduce

just click and open any problem

Expected behavior

I expect no error message

Extension Output

(node:2798) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) [76] Minimum Window Substring
[76] Minimum Window Substring

https://leetcode.com/problems/minimum-window-substring/description/

https://leetcode.com/problems/minimum-window-substring/description/

Tags: algorithms facebook linkedin snapchat uber hash-table two-pointers string sliding-window

Tags: algorithms facebook linkedin snapchat uber hash-table two-pointers string sliding-window

Langs: c cpp csharp dart elixir erlang golang java javascript kotlin php python python3 racket ruby rust scala swift typescript

Langs: c cpp csharp dart elixir erlang golang java javascript kotlin php python python3 racket ruby rust scala swift typescript

Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "".

The testcases will be generated such that the answer is unique.

 

Example 1:

Input: s = "ADOBECODEBANC", t = "ABC"
Output: "BANC"
Explanation: The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t.

Example 2:

Input: s = "a", t = "a"
Output: "a"
Explanation: The entire string s is the minimum window.

Example 3:

Input: s = "a", t = "aa"
Output: ""
Explanation: Both 'a's from t must be included in the window.
Since the largest window of s only has one 'a', return empty string.

 

Constraints:

 

Follow up: Could you find an algorithm that runs in O(m + n) time?

Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "".

The testcases will be generated such that the answer is unique.

 

Example 1:

Input: s = "ADOBECODEBANC", t = "ABC"
Output: "BANC"
Explanation: The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t.

Example 2:

Input: s = "a", t = "a"
Output: "a"
Explanation: The entire string s is the minimum window.

Example 3:

Input: s = "a", t = "aa"
Output: ""
Explanation: Both 'a's from t must be included in the window.
Since the largest window of s only has one 'a', return empty string.

 

Constraints:

 

Follow up: Could you find an algorithm that runs in O(m + n) time?

(node:2805) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) (node:2804) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) [76] Minimum Window Substring

https://leetcode.com/problems/minimum-window-substring/description/

Tags: algorithms facebook linkedin snapchat uber hash-table two-pointers string sliding-window

Langs: c cpp csharp dart elixir erlang golang java javascript kotlin php python python3 racket ruby rust scala swift typescript

Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "".

The testcases will be generated such that the answer is unique.

 

Example 1:

Input: s = "ADOBECODEBANC", t = "ABC"
Output: "BANC"
Explanation: The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t.

Example 2:

Input: s = "a", t = "a"
Output: "a"
Explanation: The entire string s is the minimum window.

Example 3:

Input: s = "a", t = "aa"
Output: ""
Explanation: Both 'a's from t must be included in the window.
Since the largest window of s only has one 'a', return empty string.

 

Constraints:

 

Follow up: Could you find an algorithm that runs in O(m + n) time?

(node:2809) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) [77] Combinations
[77] Combinations

https://leetcode.com/problems/combinations/description/

Tags: algorithms backtracking

https://leetcode.com/problems/combinations/description/

Tags: algorithms backtracking

Langs: c cpp csharp elixir erlang golang java javascript kotlin php python python3 racket ruby rust scala swift typescript

Langs: c cpp csharp elixir erlang golang java javascript kotlin php python python3 racket ruby rust scala swift typescript

Given two integers n and k, return all possible combinations of k numbers out of the range [1, n].

You may return the answer in any order.

 

Example 1:

Input: n = 4, k = 2
Output:
[
  [2,4],
  [3,4],
  [2,3],
  [1,2],
  [1,3],
  [1,4],
]

Example 2:

Input: n = 1, k = 1
Output: [[1]]

 

Constraints:

Given two integers n and k, return all possible combinations of k numbers out of the range [1, n].

You may return the answer in any order.

 

Example 1:

Input: n = 4, k = 2
Output:
[
  [2,4],
  [3,4],
  [2,3],
  [1,2],
  [1,3],
  [1,4],
]

Example 2:

Input: n = 1, k = 1
Output: [[1]]

 

Constraints:

(node:2811) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) (node:2810) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) undefined:1

SyntaxError: Unexpected end of JSON input at JSON.parse () at cache.get (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/cache.js:22:15) at Plugin.save (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/plugin.js:57:23) at Plugin.save (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/plugin.js:213:33) at initPlugins (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/cli.js:63:12) at cli.run (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/cli.js:100:3) at Object. (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/bin/leetcode:3:23) at Module._compile (node:internal/modules/cjs/loader:1246:14) at Module._extensions..js (node:internal/modules/cjs/loader:1300:10) at Module.load (node:internal/modules/cjs/loader:1103:32)

Node.js v19.6.0 [82] Remove Duplicates from Sorted List II

https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/description/

Tags: algorithms linked-list

Langs: c cpp csharp dart elixir erlang golang java javascript kotlin php python python3 racket ruby rust scala swift typescript

Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Return the linked list sorted as well.

 

Example 1:

Input: head = [1,2,3,3,4,4,5]
Output: [1,2,5]

Example 2:

Input: head = [1,1,1,2,3]
Output: [2,3]

 

Constraints:

(node:2813) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) [76] Minimum Window Substring

https://leetcode.com/problems/minimum-window-substring/description/

Tags: algorithms facebook linkedin snapchat uber hash-table two-pointers string sliding-window [76] Minimum Window Substring

https://leetcode.com/problems/minimum-window-substring/description/

Tags: algorithms facebook linkedin snapchat uber hash-table two-pointers string sliding-window

Langs: c cpp csharp dart elixir erlang golang java javascript kotlin php python python3 racket ruby rust scala swift typescript

Langs: c cpp csharp dart elixir erlang golang java javascript kotlin php python python3 racket ruby rust scala swift typescript

Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "".

The testcases will be generated such that the answer is unique.

 

Example 1:

Input: s = "ADOBECODEBANC", t = "ABC"
Output: "BANC"
Explanation: The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t.

Example 2:

Input: s = "a", t = "a"
Output: "a"
Explanation: The entire string s is the minimum window.

Example 3:

Input: s = "a", t = "aa"
Output: ""
Explanation: Both 'a's from t must be included in the window.
Since the largest window of s only has one 'a', return empty string.

 

Constraints:

 

Follow up: Could you find an algorithm that runs in O(m + n) time?

Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "".

The testcases will be generated such that the answer is unique.

 

Example 1:

Input: s = "ADOBECODEBANC", t = "ABC"
Output: "BANC"
Explanation: The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t.

Example 2:

Input: s = "a", t = "a"
Output: "a"
Explanation: The entire string s is the minimum window.

Example 3:

Input: s = "a", t = "aa"
Output: ""
Explanation: Both 'a's from t must be included in the window.
Since the largest window of s only has one 'a', return empty string.

 

Constraints:

 

Follow up: Could you find an algorithm that runs in O(m + n) time?

(node:2815) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) (node:2814) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) undefined:1

SyntaxError: Unexpected end of JSON input at JSON.parse () at cache.get (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/cache.js:22:15) at Plugin.save (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/plugin.js:57:23) at Plugin.save (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/plugin.js:213:33) at initPlugins (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/cli.js:63:12) at cli.run (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/cli.js:100:3) at Object. (/Users/[user_name]/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/bin/leetcode:3:23) at Module._compile (node:internal/modules/cjs/loader:1246:14) at Module._extensions..js (node:internal/modules/cjs/loader:1300:10) at Module.load (node:internal/modules/cjs/loader:1103:32)

Node.js v19.6.0 [76] Minimum Window Substring

https://leetcode.com/problems/minimum-window-substring/description/

Tags: algorithms facebook linkedin snapchat uber hash-table two-pointers string sliding-window

Langs: c cpp csharp dart elixir erlang golang java javascript kotlin php python python3 racket ruby rust scala swift typescript

Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "".

The testcases will be generated such that the answer is unique.

 

Example 1:

Input: s = "ADOBECODEBANC", t = "ABC"
Output: "BANC"
Explanation: The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t.

Example 2:

Input: s = "a", t = "a"
Output: "a"
Explanation: The entire string s is the minimum window.

Example 3:

Input: s = "a", t = "aa"
Output: ""
Explanation: Both 'a's from t must be included in the window.
Since the largest window of s only has one 'a', return empty string.

 

Constraints:

 

Follow up: Could you find an algorithm that runs in O(m + n) time?

(node:2844) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created)

Your Environment

}

edit 1: fixed OS version. edit 2: typo and larger font in a specific line

wangyerdfz commented 1 year ago

Okay I just noticed that it's possible that my login expired right at that moment. After re-login I am not able to repro this issue.

Just kidding. The issue is still there. This time my login was not expired.

ashish-pankhedkar commented 1 year ago

same issue

Areufm commented 8 months ago

same issue