Last active
March 18, 2018 12:45
-
-
Save visamz/21abbb23812919792fae to your computer and use it in GitHub Desktop.
npm_prompt.lua:11: attempt to concatenate local 'package_version' (a nil value)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c:\cmder/vendor/clink-completions/npm_prompt.lua:11: attempt to concatenate local 'package_version' (a nil value) | |
The solution that worked for me was to edit the file: | |
{YOUR_PATH}/cmder/vendor/clink-completions/npm_prompt.lua | |
and overwrite the related lines to be this instead: | |
The original npm_prompt.lua was (BEFORE FIX) | |
... | |
local package_name = string.match(package_info, '"name"%s*:%s*"(%g-)"') | |
local package_version = string.match(package_info, '"version"%s*:%s*"(.-)"') | |
... | |
and the change is (AFTER FIX): | |
... | |
local package_name = string.match(package_info, '"name"%s*:%s*"(%g-)"') | |
if package_name == nil then | |
package_name = '' | |
end | |
local package_version = string.match(package_info, '"version"%s*:%s*"(.-)"') | |
if package_version == nil then | |
package_version = '' | |
end | |
... | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An alternative that will completely hide the yellow
(@)
if bothpackage_name
andpackage_version
arenil
: