-
Notifications
You must be signed in to change notification settings - Fork 12k
Regression: project is not working anymore from 6.0.8 -> 6.1.0 (in lerna monorepos) #11685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same setup - same issue here. Working on a workaround, I'll let you know if it works. |
I have been playing around with combining lerna packages with angular worspace, so I would pull the angular.json and all related dependencies into the root package. Then the lerna packages would be semantically the same as the angular workspace libraries/applications. This would also "fix" this bug, as the angular project root would be equal to the lerna root. I am confident this will work (and will be cool) However this is not something we can easily achieve in existing projects and I still see this as regression bug. |
Same here. We have tried both Lerna and Rush.js, same result. |
@hansl I am happy to create a PR for this issue. However, this is not really a bug in the code, more like a decision on how you check for dependencies. Is there anything I can do to speed this up? |
maybe there is the need for a setting in |
See this issue with linked PRs #3864 |
still broken in |
|
Added to the top of our backlog |
In the meantime, not ideal, but a quick fix on the lerna.json file to NOT hoist certain dependencies..
|
Actually, even this fix above is a nightmare as anything that is used by the UI needs to be set as a NOHOIST ...... So its a lot of packages. Anybody find an alternative fix ? |
I am using 6.1.5 (installed today). |
@appsolutegeek try to add your dependencies in the root package.json. Then you will be able to hoist the dependencies within your packages. |
I'm having the same issue, with only using Yarn workspaces. The |
@gombosg no problem, hopefully, we can update the cli soon, so I can remove the NO HOIST packages. |
sadly, the nohoist option is only available for also sadly
does not seem to mean "this is the very next issue that gets fixed" |
|
Is there any update when the issue will be fixed? |
@hansl 👍 |
wait a minute, why did this not land in |
@ctaepper It seems that it went in |
@alexeagle, @hansl, could we also have the fix on |
Hi there, anyone tested monorepo approach with Firebase Cloud Functions ? The idea: multiple apps for multiple Firebase targets, hosted via Firebase hosting. Each target would be a subdomain. I manage to do that. But I'm struggling with Firebase Cloud Functions setup to be OK in the monorepo. It just doesn't work for now. Do you have best practices to share ? |
@johanchouquet I have an angular monorepo with multiple firebase projects in it, including a firebase functions project. I can confirm it works fine. |
@thefliik , I'm so glad to hear that it can work. Then, i have this structure. I created 3 apps with the CLI. So my project structure is:
Everything is standard there. When I do
I'm not sure if i don't something wrong or anything. I'm using the latest dependencies in the
So, did you configure something to make Firebase Cloud Functions work fine in the monorepo ? |
@johanchouquet it's been a while since I set it up, so I can't remember if I encountered any issues in the beginning. My folder structure is like so
It's set up using yarn with yarn workspaces. The workspace's {
"workspaces": {
"packages": [
"apps/*",
"libs/*"
]
}
} The only other thing of note is that the {
"functions": {
"source": "apps/functions"
}
} This all being said, your error message looks like it's coming from a syntax error in a typings file. Have you examined the file causing the error? Looks like it could be caused by an incorrect typescript version. Or perhaps the typings for dependencies are clashing in some way. 🤔 💭 It's times like these I wish github had some sort of direct messaging system, to avoid cluttering issues. |
Thanks @thefliik.
So true ^^!
I'm looking into this right now. I've created my workspace using Angular Console. So I didn't expect that there would be issues in typescript versions or else. Maybe this is not related, but just saying. BTW, AngularConsole is really amazing. I'll look into yarn workspaces. Seems to be simpler to deal with Cloud Functions. |
@johanchouquet sometimes typescript version errors can be hidden by vscode. VSCode, so long as it is kept updated, seems to always use the latest typescript version for intellisense. If your project has an older version of typescript installed, this means that vscode may not show you errors if you accidentally use a typescript feature that is newer than the typescript version your project is using (or if you depend on a library which, in turn, depends on a newer typescript version than you are using). For example, a firebase functions project of mine was using typescript ~3.2. But I accidentally pulled in a library which made use of the new |
@thefliik , indeed, my tsc version was 3.1.6 in VS Code terminal ! I managed to change it to the same version used in my projects (v3.4.5). But nothing changed: i still have those errors... Very strange behavior. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Repro steps
Our angular/cli project ist located as one package of a larger lerna monorepo. We also make use of yarn workspaces, so all (or most) dependencies are hoisted within one single root node_modules folder. The resulting structure is something like
this line now (as of 6.1.0) prevents the project from working (at all) because
relativePotential.startsWith('..') === true
because in our structurerelativePotential = ../../node_modules/@angular/core/package.json
everything was working fine with 6.0.8
The log given by the failure
You seem to not be depending on "@angular/core" and/or "rxjs". This is an error.
Desired functionality
I can work on my angular project with latest versions of everything
The text was updated successfully, but these errors were encountered: