Exception while running command: ng run x:deploy
Version info
Angular: 8.0.0
Firebase: 6.1.0
AngularFire: 5.2.0-rc.1
OS: Windows 10 Pro (Version: 1809)
How to reproduce these conditions
Failing test unit, Plunkr, or JSFiddle demonstrating the problem
Steps to set up and reproduce
Sample data and security rules
Debug output
Errors in the JavaScript console
C:\Users\X\Documents\X\X\X>ng run Admin:deploy
ENOENT: no such file or directory, open '\C\Users\X\Documents\X\X\X\.firebaserc'
Error: ENOENT: no such file or directory, open '\C\Users\X\Documents\X\X\X\.firebaserc'
at Object.openSync (fs.js:431:3)
at Object.readFileSync (fs.js:333:35)
at Object.getFirebaseProjectName (C:\Users\X\Documents\X\X\X\node_modules\@angular\fire\schematics\utils.js:53:41)
at Object.<anonymous> (C:\Users\X\Documents\X\X\X\node_modules\@angular\fire\schematics\deploy\builder.js:26:37)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\X\Documents\X\X\X\node_modules\@angular\fire\schematics\deploy\builder.js:4:58)
Output from firebase.database().enableLogging(true);
Screenshots
Expected behavior
Running the following command ng run x:deploy have to successfully build and deploy the project to Firebase Hosting.
Note: the x above is the project name.
Actual behavior
Fails at the beginning to find .firebaserc file but it exists. I figured out the path \C\Users\X\Documents\X\X\X\.firebaserc is wrong.
Did you first run ng add @angular/fire@next? If so I'll run this on a Windows machine at next opportunity and find the problem with the schematic.
Did you first run
ng add @angular/fire@next? If so I'll run this on a Windows machine at next opportunity and find the problem with the schematic.
Yes, I did. Thanks!
Hi ! Amazing command ! But I got the same issue :disappointed:
Angular 8 + ng add @angular/fire@next
Works on Linux but not on Windows
Im getting the same issue.
I have the same problem with angular 8 on windows. This issue helped me: #2101
got the same issue
Getting same issue with Angular 8.2.0 and @angular/[email protected]
Same issue. I'm using @angular/core 8.2.0 and @angular/fire 5.2.1.
Same Issue: testing deploy angular cli 8.3.0 @angular/fire 5.2.1 windows 10
Same problem on windows.
This is what I did to launch my application:
(1) make sure public directory is set to dist/<project name> All the tutorials says dist but that does not work. It needs the project folder path.
(2) since ng deploy does not work and ng build --prod gives errors, I use ng build.
(3) After I did all the above I do firebase deploy and that's it. That means @angular/fire was practically not used.
Updated Node to latest Angular cli to latest yarn still shows as 1.15.2 though I updated that too 0_o did a ng update --all then requested rxjs be updated explicitly
Same error and result
Can concur with Crisp3333, bypassed the new command a few weeks ago with the manual process.
Same issue on Windows 10 | @angular/cli 8.3.3 | @angular/fire 5.2.1
C:\Users\User\projects\test> ng deploy
An unhandled exception occurred: ENOENT: no such file or directory, open '\C\Users\User\projects\test\.firebaserc'
See "C:\Users\User\AppData\Local\Temp\ng-dWxjal\angular-errors.log" for further details.
same issue on windows 10 and stable node version
I am able to fix this issue by doing the following changes :
In \node_modules@angular\fire\schematics\utils.js > In getFirebaseProjectName method
replace
const { targets } = JSON.parse(fs_1.readFileSync(path_1.join(projectRoot, ".firebaserc"), "UTF-8"));
with
const { targets } = JSON.parse(fs_1.readFileSync(".firebaserc", "UTF-8"));
and In \node_modules@angular\fire\schematics\deploy\builder.js
replace
yield actions_1.default(require("firebase-tools"), context, core_1.join(workspace.root, project.root), firebaseProject);
with
yield actions_1.default(require("firebase-tools"), context, project.root, firebaseProject);
Any update on this?
any updates ? , it should work on windows, @ngdevelop-tech has it right
Ive just deployed with ng deploy, which doesnt work form me before.
rewriting utils.js an buider. js like described below helps.
Same issue here. The best solution currently seems to be avoiding ng deploy for now and just following the normal firebase CLI deploy option.
trying to use this for the 1st time -- same issue 👎
Same for me, using both:
ng run [ANGULAR_PROJECT_NAME]:deploy
or
ng deploy