Closed ArbestNew closed 4 years ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Test npm install in another firebase projects functions folder, no error occur. I found the firebase-admin version is 8.0.0 and firebase-function version is 3.1.0 idecribed in package.json.
So I manually changed the package.json in the failed project to that pair and run npm install again, but the error occur as well.
I found a log file during init process, which is removed after i finish the rest of the steps after the error, the log is attached and it is the version right after the error occur
[debug] [2019-10-30T00:33:04.239Z] ----------------------------------------------------------------------
[debug] [2019-10-30T00:33:04.241Z] Command: C:\Program Files\nodejs\node.exe C:\Users\Yunfa\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js init
[debug] [2019-10-30T00:33:04.241Z] CLI Version: 7.6.1
[debug] [2019-10-30T00:33:04.241Z] Platform: win32
[debug] [2019-10-30T00:33:04.241Z] Node Version: v10.16.3
[debug] [2019-10-30T00:33:04.243Z] Time: Tue Oct 29 2019 19:33:04 GMT-0500 (Central Daylight Time)
[debug] [2019-10-30T00:33:04.243Z] ----------------------------------------------------------------------
[debug] [2019-10-30T00:33:04.243Z]
[debug] [2019-10-30T00:33:04.256Z] > 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] [2019-10-30T00:33:04.256Z] > authorizing via signed-in user
[info]
######## #### ######## ######## ######## ### ###### ########
## ## ## ## ## ## ## ## ## ## ##
###### ## ######## ###### ######## ######### ###### ######
## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ######## ######## ## ## ###### ########
You're about to initialize a Firebase project in this directory:
C:\Users\Yunfa\Desktop\Files\Live-Message-Product\Firebase
[info]
=== Project Setup
[info]
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] [2019-10-30T00:33:11.423Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects?pageSize=100
[debug] [2019-10-30T00:33:12.024Z] <<< HTTP RESPONSE 200
[info] i Using project live-message-s (Live Message S)
[info]
=== Firestore Setup
[debug] [2019-10-30T00:33:15.474Z] > 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] [2019-10-30T00:33:15.474Z] > authorizing via signed-in user
[debug] [2019-10-30T00:33:15.475Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/live-message-s
[debug] [2019-10-30T00:33:15.713Z] <<< HTTP RESPONSE 200
[info]
[info] Firestore Security Rules allow you to define how and when to allow
[info] requests. You can keep these rules in your project directory
[info] and publish them with firebase deploy.
[info]
[debug] [2019-10-30T00:33:18.266Z] >>> HTTP REQUEST GET https://firebaserules.googleapis.com/v1/projects/live-message-s/releases?pageSize=10&pageToken=
[debug] [2019-10-30T00:33:18.576Z] <<< HTTP RESPONSE 200
[debug] [2019-10-30T00:33:18.577Z] Found ruleset: projects/live-message-s/rulesets/c224bc81-abfb-49bc-a424-ba471015e9b9
[debug] [2019-10-30T00:33:18.577Z] >>> HTTP REQUEST GET https://firebaserules.googleapis.com/v1/projects/live-message-s/rulesets/c224bc81-abfb-49bc-a424-ba471015e9b9
[debug] [2019-10-30T00:33:18.769Z] <<< HTTP RESPONSE 200
[info]
[info] Firestore indexes allow you to perform complex queries while
[info] maintaining performance that scales with the size of the result
[info] set. You can keep index definitions in your project directory
[info] and publish them with firebase deploy.
[info]
[debug] [2019-10-30T00:33:19.925Z] >>> HTTP REQUEST GET https://firestore.googleapis.com/v1beta2/projects/live-message-s/databases/(default)/collectionGroups/-/indexes
[debug] [2019-10-30T00:33:19.926Z] >>> HTTP REQUEST GET https://firestore.googleapis.com/v1beta2/projects/live-message-s/databases/(default)/collectionGroups/-/fields?filter=indexConfig.usesAncestorConfig=false
[debug] [2019-10-30T00:33:20.224Z] <<< HTTP RESPONSE 200
[debug] [2019-10-30T00:33:20.228Z] <<< HTTP RESPONSE 200
[info]
=== Functions Setup
[info]
[info] A functions directory will be created in your project with a Node.js
[info] package pre-configured. Functions can be deployed with firebase deploy.
[info]
[debug] [2019-10-30T00:33:20.295Z] > 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] [2019-10-30T00:33:20.296Z] > authorizing via signed-in user
[debug] [2019-10-30T00:33:20.296Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/live-message-s
[debug] [2019-10-30T00:33:20.518Z] <<< HTTP RESPONSE 200
[debug] [2019-10-30T00:33:20.523Z] >>> HTTP REQUEST POST https://serviceusage.googleapis.com/v1/projects/live-message-s/services/cloudfunctions.googleapis.com:enable
[debug] [2019-10-30T00:33:20.524Z] >>> HTTP REQUEST POST https://serviceusage.googleapis.com/v1/projects/live-message-s/services/runtimeconfig.googleapis.com:enable
[debug] [2019-10-30T00:33:20.935Z] <<< HTTP RESPONSE 200
[debug] [2019-10-30T00:33:20.937Z] <<< HTTP RESPONSE 200
[info] + Wrote functions/package.json
[info] + Wrote functions/index.js
[info] + Wrote functions/.gitignore
[info]
[error] NPM install failed, continuing with Firebase initialization...
[info]
=== Hosting Setup
[info]
[info] Your public directory is the folder (relative to your project directory) that
[info] will contain Hosting assets to be uploaded with firebase deploy. If you
[info] have a build process for your assets, use your build's output directory.
[info]
Problem finally solved by clear the npm cache and then reinstall the firebase tools (clear the cache is necessary and only re-install will not work)
Clearing the npm cache and update it back again before re-install firebase tools.
I don't know if I should close this issue, I will leave this right to your team right now,
@ArbestNew thanks for reporting that you solved this yourself! Since I haven't heard any similar reports I am going to close this an assume that the cache clean was a one-time thing. For future reference if you experience issues with firebase init
please file them on the firebase-tools
repository.
Related issues
Related issues not found. But it seems like the error can be located to the npm file source files of
@firebase/logger@0.1.28
&@firebase/util@0.2.31
[REQUIRED] Version info
node:10.16.3
firebase-functions:3.3.0
firebase-tools:7.6.2
firebase-admin:8.6.1
[REQUIRED] Test case
Initilize a firebase project in a blank folder.
[REQUIRED] Steps to reproduce
Run in terminal inside a blank folder. (Try to initialize the project)
$ firebase init
Options selected during the setup are listing below:The log mentioned will be attached behind.
I tried to manually run the npm install inside the functions folder but the same error info come up.
Please NOTE: This issue happened after i update my firebase-tools from 7.6.1 to 7.6.2 so i try to reinstall version 7.6.1, but the same issue still occur.
[REQUIRED] Expected behavior
Finish the dependencies installation after the
firebase init
command[REQUIRED] Actual behavior
No firebase log since the project no initilzed yet.
Were you able to successfully deploy your functions?
Was able to succefully init the projects (Only this time not work, have success expirenece over other 10 projects)