angular / angular

Deliver web apps with confidence 🚀
https://angular.dev
MIT License
95.73k stars 25.27k forks source link

Firebase deploy not working on 10.0.1 #37800

Closed spock123 closed 4 years ago

spock123 commented 4 years ago

Hi, I have a strange issue on all my projects when trying to upgrade from ng9.x to 10.0.1

Build goes fine, but Firebase throws errors when trying to deploy to static hosting.

I am not sure what is going on or if it's even related to Angular, but the same thing has now happened to me on 3 different projects.

Is this a regression?

Possibly, worked in 9.1.x and as soon as I upgrade to 10.0.1 I can no longer deploy to Firebase.

Exception or Error

Npm log after trying firebase deploy --only hosting --project test(my test project)



silly lifecycle fabrik-menu-poc@0.0.0~deploy:test: Args: [ '-c', 'firebase deploy --only hosting --project test' ]
11 silly lifecycle fabrik-menu-poc@0.0.0~deploy:test: Returned: code: 2  signal: null
12 info lifecycle fabrik-menu-poc@0.0.0~deploy:test: Failed to exec deploy:test script
13 verbose stack Error: fabrik-menu-poc@0.0.0 deploy:test: `firebase deploy --only hosting --project test`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter. (/Users/lrj/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
13 verbose stack     at ChildProcess. (/Users/lrj/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:210:5)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid fabrik-menu-poc@0.0.0
15 verbose cwd /Users/lrj/project/mother-qorder/frontend
16 verbose Darwin 19.5.0
17 verbose argv "/Users/lrj/.nvm/versions/node/v12.13.1/bin/node" "/Users/lrj/.nvm/versions/node/v12.13.1/bin/npm" "run" "deploy:test"
18 verbose node v12.13.1
19 verbose npm  v6.12.1
20 error code ELIFECYCLE
21 error errno 2
22 error fabrik-menu-poc@0.0.0 deploy:test: `firebase deploy --only hosting --project test`
22 error Exit status 2
23 error Failed at the fabrik-menu-poc@0.0.0 deploy:test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

🌍 Your Environment

Angular Version:


Angular CLI: 10.0.0
Node: 12.13.1
OS: darwin x64

Angular: 10.0.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.0
@angular-devkit/build-angular     0.1000.0
@angular-devkit/build-optimizer   0.1000.0
@angular-devkit/build-webpack     0.1000.0
@angular-devkit/core              10.0.0
@angular-devkit/schematics        10.0.0
@angular/cdk                      9.2.0
@angular/cli                      10.0.0
@angular/fire                     5.4.2
@angular/material                 9.2.0
@ngtools/webpack                  10.0.0
@schematics/angular               10.0.0
@schematics/update                0.1000.0
rxjs                              6.5.4
typescript                        3.9.5
webpack                           4.43.0

Anything else relevant?

MacOS
Node 12.x
spock123 commented 4 years ago

DevDependencies:


  "devDependencies": {
    "@angular-devkit/build-angular": "^0.1000.0",
    "@angular/cli": "~10.0.0",
    "@angular/compiler-cli": "~10.0.1",
    "@angular/language-service": "~10.0.1",
    "@types/jasmine": "~3.5.10",
    "@types/jasminewd2": "~2.0.3",
    "@types/lodash": "^4.14.149",
    "@types/node": "^12.11.1",
    "codelyzer": "^5.1.2",
    "firebase": "^7.15.5",
    "firebase-tools": "^8.4.3",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.0.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~3.3.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "ngrx-store-freeze": "^0.2.4",
    "npm-run-all": "^4.1.5",
    "npx": "^10.2.2",
    "protractor": "~7.0.0",
    "shx": "^0.3.2",
    "ts-node": "~8.8.1",
    "tslint": "~6.1.0",
    "typescript": "~3.9.5"
  }
spock123 commented 4 years ago

Firebase-deploy.log

[debug] [2020-06-27T23:09:52.871Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Sat, 27 Jun 2020 23:09:52 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2020-06-27T23:09:53.009Z] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:112:11)
    at Object.join (path.js:1040:7)
    at Object.checkFunctionsSDKVersion [as fn] (/Users/lrj/.nvm/versions/node/v12.13.1/lib/node_modules/firebase-tools/lib/checkFirebaseSDKVersion.js:33:28)
    at Command.<anonymous> (/Users/lrj/.nvm/versions/node/v12.13.1/lib/node_modules/firebase-tools/lib/command.js:159:30)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/lrj/.nvm/versions/node/v12.13.1/lib/node_modules/firebase-tools/lib/command.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
[error]
[error] Error: An unexpected error has occurred.
~                                                
JoostK commented 4 years ago

I am guessing you're seeing the effect of this change: https://github.com/firebase/firebase-tools/pull/2047

That's been released in firebase-tools 8.1.0, maybe you were using an older version before the upgrade. I don't see any Angular related commands in your snippets, so I'm not sure how this is actionable for us?

spock123 commented 4 years ago

@JoostK thank you , yes I think I've been using 7.x of Firebase-tools.

Update: updated to 8.4.3 of Firebase-tools, problem unfortunately consists.

I'll close the issue now, thank you again.

spock123 commented 4 years ago

@JoostK I have filed an issue over at Firebase Tools repo. (https://github.com/firebase/firebase-tools/issues/2408)

I am using the latest Firebase-tools though, not sure what's going on. It consistently works on Angular 9.1, but as soon as I upgrade to 10, firebase deploy throws errors.

Very strange indeed.

spock123 commented 4 years ago

I resolved my issue - and I'm such an *diot..

I did update Firebase-Tools to 8.1.. but only now did I realize I had it installed in the project, as well as globally. I only updated the project version, but every time I used the command, it took the globally installed first (7.x)..

Feeling really dumb right now :)

Cheers

angular-automatic-lock-bot[bot] commented 4 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.