我有一个由两个工作区组成的项目:
packages/client
中的packages/server
中的这是根package.json
:
{
"name": "workspace-demo",
"version": "0.0.1",
"license": "MIT",
"private": true,
"workspaces": {
"packages": [
"packages/*"
]
}
}
这是问题:出于某种原因,在向客户端和/或服务器添加了某些依赖关系(来自Angular和NestJS的依赖关系)之后,Yarn决定将@nestjs
依赖关系移至{ {1}},而不是将其放在根packages/server/node_modules
文件夹中。那就是依赖从node_modules
移到了node_modules/@nestjs
。
packages/server/node_modules/@nestjs
的内容:
packages/client/package.json
{
"name": "client",
"version": "0.0.1",
"private": true,
"dependencies": {
"@angular/animations": "~8.2.7",
"@angular/common": "~8.2.7",
"@angular/compiler": "~8.2.7",
"@angular/core": "~8.2.7",
"@angular/forms": "~8.2.7",
"@angular/platform-browser": "~8.2.7",
"@angular/platform-browser-dynamic": "~8.2.7",
"@angular/router": "~8.2.7"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.5",
"@angular/cli": "~8.3.5",
"@angular/compiler-cli": "~8.2.7",
"@angular/language-service": "~8.2.7",
"@types/node": "~8.9.4",
"typescript": "~3.5.3"
}
}
的内容:
packages/server/package.json