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
Function Dependencies Causing Build To Fail #3025
Comments
|
Have the same problem, already tried to find a fix for it but have no solution right now. There are also many warning messages while trying to deploy. I think this causes the problem but I'm not sure. |
|
I deleted the node_modules folder and removed everything from the root package.json. I then created a new set of dependencies. I now get a new error while trying to deploy:
Here is the current package.json from the project root folder (main package.json): The dist/sample/functions folder does have a generated package.json and package-lock.json, so not sure why the cloud builder is not able to access or detect that they exist. |
|
The project runs, when using |
|
@jasonbdt I found (A / THE) solution, but you may not like it. You'll have to do some downgrading so that all your dependencies can build properly. Here's what I did:
I believe those are the main three. I was able to keep angular (core, common, fire, material, etc..) at the latest versions. Be sure to change the |
|
@firstlinestudio Well, my environment runs on the following setup:
My Angular is at Version 12.2.0. When I want to update with Are you sure that NodeJS and NPM causes the error? |
|
@jasonbdt I'm sure that is what fixed my deploy issue, but it didn't not fix the project all together. I now have an issue with the SSR function not retrieving URLs. Every URL except root will return a "cannot get URL /sample/url" message when trying to access through the function. I can navigate the site just fine, but if I refresh a page -- other than the root homepage -- it will throw an error. That is in development. In production, the message shows |
|
The project is back to working fully. The moral of the story is to manage dependencies properly. I'm not sure if it is listed in the docs, but it would be useful to add "optimal" package versions somewhere (i.e. use nodejs 14, not nodejs 16) and/or have an optimal package.json available for the latest build. I recommend NOT doing a general |


Version info
Angular: 12.2.29
Firebase: 9.1.2 / 9.1.3
AngularFire: 7.1.0 / 7.1.1
Other (e.g. Ionic/Cordova, Node, browser, operating system): Windows Terminal / PowerShell
How to reproduce these conditions
Failing test unit, Stackblitz demonstrating the problem
Steps to set up and reproduce
In any terminal / powershell, run: ng deploy. The process will run until it attempts to upload the function. The function fails to deploy.
Sample data and security rules
package.json created in dist/{PROJECT_NAME}/functions
Debug output
** Errors in Windows Terminal **
** Error output from Google Cloud Builder Log **
"Step #1 - "build": Failure: (ID: XXXXXX) npm ERR! @angular-devkit/architect not accessible from {PROJECT_NAME}"
Expected behavior
To deploy successfully. Using 7.1.0-rc.4, the dist package.json does not try to access root dependencies and deploys successfully.
Actual behavior
Project will not deploy with cloud functions
The text was updated successfully, but these errors were encountered: