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.
@ngdevelop-tech that fixed the insue for me, thanks! https://github.com/angular/angularfire2/issues/2088#issuecomment-529192788
Temporary workaround if you don't want to change the core files:
Add "deploy" : "ng build && firebase deploy" to scripts in package.json
Run: npm run deploy.
Any update on when this change will be added so we don't have to do this to the core files each time? @ngdevelop-tech
Any update on when this change will be added so we don't have to do this to the core files each time? @ngdevelop-tech
@rlee1990 PR is in progress. Soon will let you know for updates.
I has the same problem, i believe that the command don't understant the path correct of the file .firebaserc, in my case, he tried found \D\Unimed\projetos\app-unimedbr.firebaserc but the correct is D:\