我的团队正在迁移到rush,而我在设置它时遇到了一个问题:当我试图使用react(例如)将任何第三方库(比如react)添加到package.json时,我遇到了一个奇怪的错误。错误日志:
Found configuration in /home/ivan/dev/JS/eisbuk/rush.json
Rush Multi-Project Build Tool 5.66.2 - https://rushjs.io
Node.js version is 14.19.0 (LTS)
Found configuration in /home/ivan/dev/JS/eisbuk/rush.json
Starting "rush add"
Determining new version for dependency: react
No version selector was specified, so the version will be determined automatically.
Trying to acquire lock for pnpm-6.32.3
Acquired lock for pnpm-6.32.3
Found pnpm version 6.32.3 in /home/ivan/.rush/node-v14.19.0/pnpm-6.32.3
Symlinking "/home/ivan/dev/JS/eisbuk/common/temp/pnpm-local" --> "/home/ivan/.rush/node-v14.19.0/pnpm-6.32.3"
The "ensureConsistentVersions" policy is NOT active, so we will assign the latest version.
Querying NPM registry for latest version of "react"...
ERROR: The command failed with exit code 243我试图找到一个类似的问题报告与rush和查找243错误与npm,两者都没有效果。我使用的是pnpm,但是,这个错误仍然存在于npm和纱线中(对于纱线,它是exit code 1,其他一切都是一样的)。
下面是我的.npmrc (实际上是默认的):
registry=https://registry.npmjs.org/
always-auth=false有趣的是,如果我手动向package.json添加依赖项并运行rush update,则更新进行得很顺利,dep被添加到node_modules和收缩包装中(因此不应该是npm注册表问题)。这是我的rush.json:
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
"rushVersion": "5.66.2",
"pnpmVersion": "6.32.3",
"pnpmOptions": {
"preventManualShrinkwrapChanges": true,
"useWorkspaces": true
},
"nodeSupportedVersionRange": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0",
"gitPolicy": {},
"repository": {},
"eventHooks": {
"preRushInstall": [],
"postRushInstall": [],
"preRushBuild": [],
"postRushBuild": []
},
"variants": [],
"projects": [
/** ...other projects */
{
"packageName": "@eisbuk/functions",
"projectFolder": "packages/functions"
}
/** ...other projects */
]
}整个回购程序可以在以下网站找到:https://github.com/eisbuk/EisBuk/tree/feature/rush
发布于 2022-04-16 08:14:47
解决了!
最后,我设法将其定位到节点版本。我用的是14.19.0版,撞到了16.14.2版就解决了。我不知道这是不是一个已知的不兼容,但它在这里。
https://stackoverflow.com/questions/71883406
复制相似问题