View difference between Paste ID: rBG05yVp and yi5sh9ED
SHOW: | | - or go back to the newest paste.
1-
c:\cmder/vendor/clink-completions/npm_prompt.lua:11: attempt to concatenate local 'package_version' (a nil value)  
1+
c:\cmder/vendor/clink-completions/npm_prompt.lua:11: attempt to concatenate local 'package_version' (a nil value)  
2-
2+
3-
The solution that worked for me was to edit the file:
3+
The solution that worked for me was to edit the file:
4-
{YOUR_PATH}/cmder/vendor/clink-completions/npm_prompt.lua
4+
{YOUR_PATH}/cmder/vendor/clink-completions/npm_prompt.lua
5-
and overwrite the related lines to be this instead:
5+
and overwrite the related lines to be this instead:
6-
6+
7-
The original npm_prompt.lua was (BEFORE FIX)  
7+
The original npm_prompt.lua was (BEFORE FIX)  
8-
8+
9-
...
9+
...
10-
local package_name = string.match(package_info, '"name"%s*:%s*"(%g-)"')
10+
local package_name = string.match(package_info, '"name"%s*:%s*"(%g-)"')
11-
local package_version = string.match(package_info, '"version"%s*:%s*"(.-)"')
11+
local package_version = string.match(package_info, '"version"%s*:%s*"(.-)"')
12-
...
12+
...
13-
13+
14-
and the change is (AFTER FIX):  
14+
and the change is (AFTER FIX):  
15-
15+
16-
16+
17-
...
17+
...
18-
local package_name = string.match(package_info, '"name"%s*:%s*"(%g-)"')
18+
local package_name = string.match(package_info, '"name"%s*:%s*"(%g-)"')
19-
if package_name == nil then
19+
if package_name == nil then
20-
    package_name = ''
20+
    package_name = ''
21-
end     
21+
end     
22-
local package_version = string.match(package_info, '"version"%s*:%s*"(.-)"')
22+
local package_version = string.match(package_info, '"version"%s*:%s*"(.-)"')
23-
if package_version == nil then
23+
if package_version == nil then
24-
    package_version = ''
24+
    package_version = ''
25-
end
25+
end
26-
...
26+
...
27-
27+
28-
28+
29-
29+
30
```