From e5e7bd035ddc21acd4980fe5fc8c5cfecac48dc8 Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Thu, 31 Aug 2023 18:12:31 +0300 Subject: [PATCH] Improve npm version parsing (#190) --- build/utils/npm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/utils/npm.go b/build/utils/npm.go index 114783ef..2d43e1e2 100644 --- a/build/utils/npm.go +++ b/build/utils/npm.go @@ -403,7 +403,7 @@ func GetNpmVersionAndExecPath(log utils.Log) (*version.Version, string, error) { if err != nil { return nil, "", err } - return version.NewVersion(string(versionData)), npmExecPath, nil + return version.NewVersion(strings.TrimSpace(string(versionData))), npmExecPath, nil } type PackageInfo struct {