Firebase-tools: Cannot deploy using Firebase Tools v3.18.0

Created on 3 Apr 2018  路  8Comments  路  Source: firebase/firebase-tools

Version info

3.18.0

Platform Information

macOS High Sierra; also the same result inside node:9.10.1 Docker container

Steps to reproduce

$ firebase deploy
$ firebase deploy --only hosting

...or, any other variation of the deploy command. Testing it with React Starter Kit for Firebase.

Expected behavior

Should deploy as usual.

Actual behavior

Fails with the following debug output:

[2018-04-03T19:37:05.356Z] ----------------------------------------------------------------------
[2018-04-03T19:37:05.362Z] Command:       /usr/local/Cellar/node/9.10.1/bin/node /usr/local/bin/firebase --debug deploy --only hosting
[2018-04-03T19:37:05.362Z] CLI Version:   3.18.0
[2018-04-03T19:37:05.362Z] Platform:      darwin
[2018-04-03T19:37:05.362Z] Node Version:  v9.10.1
[2018-04-03T19:37:05.363Z] Time:          Tue Apr 03 2018 22:37:05 GMT+0300 (MSK)
[2018-04-03T19:37:05.363Z] ----------------------------------------------------------------------

[2018-04-03T19:37:05.382Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2018-04-03T19:37:05.383Z] > authorizing via signed-in user
[2018-04-03T19:37:05.385Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/example

 Tue Apr 03 2018 22:37:05 GMT+0300 (MSK)
[2018-04-03T19:37:06.193Z] <<< HTTP RESPONSE 200 server=nginx, date=Tue, 03 Apr 2018 19:37:06 GMT, content-type=application/json; charset=utf-8, content-length=102, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
[2018-04-03T19:37:06.193Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/example/tokens

 Tue Apr 03 2018 22:37:06 GMT+0300 (MSK)
[2018-04-03T19:37:06.979Z] <<< HTTP RESPONSE 200 server=nginx, date=Tue, 03 Apr 2018 19:37:06 GMT, content-type=application/json; charset=utf-8, content-length=256, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
[2018-04-03T19:37:07.818Z] Error: spawn npm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
    at onErrorNT (internal/child_process.js:379:16)
    at process._tickCallback (internal/process/next_tick.js:114:19)
[2018-04-03T19:37:07.910Z] Error: spawn npm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
    at onErrorNT (internal/child_process.js:379:16)
    at process._tickCallback (internal/process/next_tick.js:114:19)

Workaround

A workaround for this is to use an older version for now ([email protected]).

Most helpful comment

Thanks for filing! I'm working on a fix.

All 8 comments

Getting the same error but using node 6.13.1. Deploy worked fine with previous version

[debug] [2018-04-03T23:11:23.152Z] ----------------------------------------------------------------------
[debug] [2018-04-03T23:11:23.154Z] Command:       /Users/andrewkenward/.nvm/versions/node/v6.13.1/bin/node /usr/local/bin/firebase deploy
[debug] [2018-04-03T23:11:23.155Z] CLI Version:   3.18.0
[debug] [2018-04-03T23:11:23.155Z] Platform:      darwin
[debug] [2018-04-03T23:11:23.155Z] Node Version:  v6.13.1
[debug] [2018-04-03T23:11:23.155Z] Time:          Wed Apr 04 2018 00:11:23 GMT+0100 (BST)
[debug] [2018-04-03T23:11:23.155Z] ----------------------------------------------------------------------
[debug] 
[debug] [2018-04-03T23:11:23.165Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2018-04-03T23:11:23.165Z] > authorizing via signed-in user
[debug] [2018-04-03T23:11:23.167Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/andykenward-6e97f  

 Wed Apr 04 2018 00:11:23 GMT+0100 (BST)
[debug] [2018-04-03T23:11:24.845Z] <<< HTTP RESPONSE 200
[debug] [2018-04-03T23:11:24.846Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/andykenward-6e97f/tokens  

 Wed Apr 04 2018 00:11:24 GMT+0100 (BST)
[debug] [2018-04-03T23:11:26.473Z] <<< HTTP RESPONSE 200
[debug] [2018-04-03T23:11:27.615Z] Error: spawn npm ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
    at onErrorNT (internal/child_process.js:376:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[debug] [2018-04-03T23:11:27.703Z] Error: spawn npm ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
    at onErrorNT (internal/child_process.js:376:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[error] 
[error] Error: An unexpected error has occurred.

Same issue under Linux regardless of node version (using NVM). Previous version worked fine. Here's my output:

[debug] [2018-04-05T04:31:27.374Z] ----------------------------------------------------------------------
[debug] [2018-04-05T04:31:27.376Z] Command:       /home/bk/.nvm/versions/node/v6.11.5/bin/node /usr/bin/firebase deploy
[debug] [2018-04-05T04:31:27.377Z] CLI Version:   3.18.0
[debug] [2018-04-05T04:31:27.377Z] Platform:      linux
[debug] [2018-04-05T04:31:27.377Z] Node Version:  v6.11.5
[debug] [2018-04-05T04:31:27.377Z] Time:          Wed Apr 04 2018 23:31:27 GMT-0500 (CDT)
[debug] [2018-04-05T04:31:27.377Z] ----------------------------------------------------------------------
[debug] 
[debug] [2018-04-05T04:31:27.387Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2018-04-05T04:31:27.387Z] > authorizing via signed-in user
[debug] [2018-04-05T04:31:27.390Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/webo-qa  

 Wed Apr 04 2018 23:31:27 GMT-0500 (CDT)
[debug] [2018-04-05T04:31:27.864Z] <<< HTTP RESPONSE 200
[debug] [2018-04-05T04:31:27.869Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/webo-qa/tokens  

 Wed Apr 04 2018 23:31:27 GMT-0500 (CDT)
[debug] [2018-04-05T04:31:28.266Z] <<< HTTP RESPONSE 200
[debug] [2018-04-05T04:31:28.578Z] Error: spawn npm ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
    at onErrorNT (internal/child_process.js:376:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[debug] [2018-04-05T04:31:28.725Z] Error: spawn npm ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
    at onErrorNT (internal/child_process.js:376:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[error] 
[error] Error: An unexpected error has occurred.

Getting similar issues with the new version:

I run the following commands:

npm install 
npm install -g firebase-tools 
firebase deploy --token "$FIREBASE_TOKEN" 

The FIREBASE_TOKEN is confirmed as the correct token.

LOG:

[debug] [2018-04-04T19:11:52.568Z] ---------------------------------------------------------------------- 
[debug] [2018-04-04T19:11:52.569Z] Command: /home/runner/.nvm/versions/node/v8.7.0/bin/node /home/runner/.nvm/versions/node/v8.7.0/bin/firebase deploy --token 1/zwS_wn5bjpI25dhejjMwv-h8hA2nUNfvlXZ7c7UlowQ 
[debug] [2018-04-04T19:11:52.569Z] CLI Version: 3.18.0 
[debug] [2018-04-04T19:11:52.569Z] Platform: linux 
[debug] [2018-04-04T19:11:52.569Z] Node Version: v8.7.0 
[debug] [2018-04-04T19:11:52.570Z] Time: Wed Apr 04 2018 19:11:52 GMT+0000 (UTC) 
[debug] [2018-04-04T19:11:52.570Z] ---------------------------------------------------------------------- 
[debug] 
[debug] [2018-04-04T19:11:52.579Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] 
[debug] [2018-04-04T19:11:52.579Z] > authorizing via --token option 
[debug] [2018-04-04T19:11:52.580Z] > refreshing access token with scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] 
[debug] [2018-04-04T19:11:52.580Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token 
{ refresh_token: '1/zwS_wn5bjpI25dhejjMwv-h8hA2nUNfvlXZ7c7UlowQ', 
client_id: '563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com', 
client_secret: 'j9iVZfS8kkCEFUPaAeJV0sAi', 
grant_type: 'refresh_token', 
scope: 'email openid https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase https://www.googleapis.com/auth/cloud-platform' } 
Wed Apr 04 2018 19:11:52 GMT+0000 (UTC) 
[debug] [2018-04-04T19:11:52.698Z] <<< HTTP RESPONSE 200 
[debug] [2018-04-04T19:11:52.698Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/sommarjobba-b16bf 

Wed Apr 04 2018 19:11:52 GMT+0000 (UTC) 
[debug] [2018-04-04T19:11:53.368Z] <<< HTTP RESPONSE 200 
[debug] [2018-04-04T19:11:53.369Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/sommarjobba-b16bf/tokens 

Wed Apr 04 2018 19:11:53 GMT+0000 (UTC) 
[debug] [2018-04-04T19:11:54.000Z] <<< HTTP RESPONSE 200 
[debug] [2018-04-04T19:11:55.143Z] TypeError: Invalid Version: undefined 
at new SemVer (/home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/node_modules/semver/semver.js:291:11) 
at compare (/home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/node_modules/semver/semver.js:578:10) 
at Function.lt (/home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/node_modules/semver/semver.js:612:10) 
at /home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/lib/checkFirebaseSDKVersion.js:46:18 
at initializePromise (/home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:567:5) 
at new Promise (/home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:1039:33) 
at /home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/lib/checkFirebaseSDKVersion.js:38:12 
at tryCatch (/home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:525:12) 
at invokeCallback (/home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:538:13) 
at publish (/home/runner/.nvm/versions/node/v8.7.0/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:508:7) 
[error] 
[error] Error: An unexpected error has occurred. 

Worked fine to instead use the previous version of firebase-tools:

npm install -g [email protected]

I was getting the same issue, what solved the problem is:
cd functions; npm install
I have functions folder in the project, if you don't, it might be something else.
I hope dev team can explain why this error is happening even if i run: firebase deploy --except functions

Thanks for filing! I'm working on a fix.

Hello,

Just wanted to check in if there is already a fix for 3.18.0 - 3.18.1 deployment issue.

Thanks in advance.

I just updated my firebase-tools to [email protected] anytime I try to run a "firebase serve --only functions" function, I get an error saying "Cannot find module 'memoizee'". I have tried installing manually but I keep getting the same error message.

@olamilekan000 please open a new issue as your question does not seem related to this one.

Was this page helpful?
0 / 5 - 0 ratings