angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Exception while running command: ng run x:deploy

Open meness opened this issue 7 years ago • 25 comments

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.

meness avatar May 29 '19 12:05 meness

@ngdevelop-tech that fixed the insue for me, thanks! https://github.com/angular/angularfire2/issues/2088#issuecomment-529192788

leodecm3 avatar Oct 13 '19 05:10 leodecm3

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.

adityacodes avatar Oct 13 '19 14:10 adityacodes

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 avatar Oct 25 '19 16:10 rlee1990

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.

ngdevelop-tech avatar Oct 25 '19 17:10 ngdevelop-tech

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:\

diogomachado avatar Nov 13 '19 16:11 diogomachado