You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the node_modules inside the newly created folder and run yarn to make sure the packages are hoisted
Run ng build or ng serve
The log given by the failure
The error: 'You seem to not be depending on "@angular/core" and/or "rxjs". This is an error.'
Desired functionality
It would be great if rxjs and @angular can be hoisted to a parent of the angular project root.
The current workaround is to add these packages to 'nohoist' in the workspace package.json. In our case this results in two instances of rxjs in the client, but the current rxjs version should be able to handle this.
I don't know why it is added though. It was added in commit 44086c6. The commit says it's a 'move', but this move of packages/@angular/cli/upgrade/version.ts to packages/angular/cli/upgrade/version.ts also has a change in the code in it.
The text was updated successfully, but these errors were encountered:
njirem
changed the title
Regression: Angular CLI doesn't work well with Yarn workspaces
Angular CLI doesn't work well with Yarn workspaces
Sep 17, 2018
Bug Report or Feature Request
Command
Versions
Angular CLI: 7.0.0-beta.3
Node: 10.10.0
OS: darwin x64
Angular: 7.0.0-beta.5
But it also occurs in the current version of Angular CLI (6.2.2).
Repro steps
node_modules
inside the newly created folder and runyarn
to make sure the packages are hoistedng build
orng serve
The log given by the failure
The error: 'You seem to not be depending on "@angular/core" and/or "rxjs". This is an error.'
Desired functionality
It would be great if
rxjs
and@angular
can be hoisted to a parent of the angular project root.The current workaround is to add these packages to 'nohoist' in the workspace
package.json
. In our case this results in two instances ofrxjs
in the client, but the currentrxjs
version should be able to handle this.Mention any other details that might be useful
This issue is also discussed in: #3864 (closed).
It seems this line is the main problem.
I don't know why it is added though. It was added in commit 44086c6. The commit says it's a 'move', but this move of
packages/@angular/cli/upgrade/version.ts
topackages/angular/cli/upgrade/version.ts
also has a change in the code in it.The text was updated successfully, but these errors were encountered: