无法将node js从14版本升级到20版本

问题描述 投票:0回答:1

目前我的项目设置是 Node JS 14 和 NPM 6。我尝试将 Node JS 升级到 20,但我发现它没有将 NPM 10 作为 Node JS 20 安装的一部分进行安装。

我尝试通过将 Node JS 20 与 npm 版本(即 6 和 10)一起保留来运行应用程序。但我面临以下错误

使用 Node JS 20 和 NPM 10

         lerna ERR! npm ci exited 1 in '@thub/common'
         lerna ERR! npm ci stderr:
         npm ERR! code EINVALIDTAGNAME
         npm ERR! Invalid tag name "^>=16.8.5" of package "react@^>=16.8.5": Tags may 
         not have any characters that encodeURIComponent encodes

使用 Node JS 20 和 NPM 6

         opensslErrorStack: [
         'error:03000086:digital envelope routines::initialization error',
         'error:0308010C:digital envelope routines::unsupported'
         ],
         library: 'digital envelope routines',
         reason: 'unsupported',
         code: 'ERR_OSSL_EVP_UNSUPPORTED'

}

任何人都可以帮助清晰地了解 Node js 升级以及 Node JS 和 NPM 的兼容版本以及是否有任何官方文档

node.js npm
1个回答
-1
投票

NPM 附带了 node.js 包,如果您遇到任何困难,请使用 NVM 包管理器。

© www.soinside.com 2019 - 2024. All rights reserved.