firebase / firebase-functions

Firebase SDK for Cloud Functions
https://firebase.google.com/docs/functions/
MIT License
1.02k stars 202 forks source link

firebase init failed while install depedence for functions #576

Closed ArbestNew closed 4 years ago

ArbestNew commented 4 years ago

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:

  1. Project: Using an existing project
  2. Services: firestore, hosting, functions, storage
  3. Name the firestore rules and index file name
  4. Language for functions: Javascript
  5. Use Eslint to force style? Yes (First time yes, not solve the issue) & No (Second time, start over, still a blank folder, not solve the issue)
  6. As single page app? No
  7. Install dependence now? Yes After this step, it shows error from NPM:
> npm ERR! Unexpected end of JSON input while parsing near '...ogger","version":"0.1'
>npm ERR! A complete log of this run can be found in:
>npm ERR!     C:\Users\Yunfa\AppData\Roaming\npm-cache\_logs\2019-10-29T23_26_47_496Z-debug.log

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


0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Yunfa\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install' ]
2 info using npm@6.12.0
3 info using node@v10.16.3
4 verbose npm-session cc86fb047a2510e4
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall functions@
7 info lifecycle functions@~preinstall: functions@
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 11ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
16 silly install loadAllDepsIntoIdealTree
17 http fetch GET 304 https://registry.npmjs.org/firebase-functions-test 208ms (from cache)
18 silly pacote range manifest for firebase-functions-test@^0.1.6 fetched in 230ms
19 http fetch GET 304 https://registry.npmjs.org/firebase-admin 227ms (from cache)
20 silly pacote range manifest for firebase-admin@^8.6.0 fetched in 232ms
21 http fetch GET 304 https://registry.npmjs.org/@types%2flodash 72ms (from cache)
22 http fetch GET 304 https://registry.npmjs.org/lodash 72ms (from cache)
23 silly pacote range manifest for @types/lodash@^4.14.104 fetched in 79ms
24 silly pacote range manifest for lodash@^4.17.5 fetched in 76ms
25 http fetch GET 304 https://registry.npmjs.org/node-forge 126ms (from cache)
26 silly pacote version manifest for node-forge@0.7.4 fetched in 139ms
27 http fetch GET 304 https://registry.npmjs.org/dicer 153ms (from cache)
28 http fetch GET 304 https://registry.npmjs.org/jsonwebtoken 155ms (from cache)
29 silly pacote range manifest for dicer@^0.3.0 fetched in 159ms
30 silly pacote version manifest for jsonwebtoken@8.1.0 fetched in 164ms
31 http fetch GET 304 https://registry.npmjs.org/@types%2fnode 193ms (from cache)
32 silly pacote range manifest for @types/node@^8.0.53 fetched in 207ms
33 http fetch GET 304 https://registry.npmjs.org/jws 79ms (from cache)
34 http fetch GET 304 https://registry.npmjs.org/lodash.isinteger 78ms (from cache)
35 http fetch GET 304 https://registry.npmjs.org/lodash.isboolean 79ms (from cache)
36 http fetch GET 304 https://registry.npmjs.org/lodash.includes 80ms (from cache)
37 silly pacote range manifest for jws@^3.1.4 fetched in 82ms
38 silly pacote range manifest for lodash.isinteger@^4.0.4 fetched in 83ms
39 silly pacote range manifest for lodash.isboolean@^3.0.3 fetched in 84ms
40 silly pacote range manifest for lodash.includes@^4.3.0 fetched in 87ms
41 http fetch GET 304 https://registry.npmjs.org/streamsearch 95ms (from cache)
42 silly pacote version manifest for streamsearch@0.1.2 fetched in 128ms
43 http fetch GET 304 https://registry.npmjs.org/lodash.isnumber 132ms (from cache)
44 silly pacote range manifest for lodash.isnumber@^3.0.3 fetched in 141ms
45 http fetch GET 304 https://registry.npmjs.org/lodash.isplainobject 162ms (from cache)
46 silly pacote range manifest for lodash.isplainobject@^4.0.6 fetched in 171ms
47 http fetch GET 304 https://registry.npmjs.org/lodash.once 170ms (from cache)
48 http fetch GET 304 https://registry.npmjs.org/lodash.isstring 171ms (from cache)
49 http fetch GET 304 https://registry.npmjs.org/ms 172ms (from cache)
50 silly pacote range manifest for lodash.once@^4.0.0 fetched in 177ms
51 silly pacote range manifest for lodash.isstring@^4.0.1 fetched in 177ms
52 silly pacote range manifest for ms@^2.0.0 fetched in 180ms
53 http fetch GET 304 https://registry.npmjs.org/xtend 157ms (from cache)
54 silly pacote range manifest for xtend@^4.0.1 fetched in 173ms
55 http fetch GET 304 https://registry.npmjs.org/@google-cloud%2fstorage 464ms (from cache)
56 http fetch GET 304 https://registry.npmjs.org/jwa 122ms (from cache)
57 silly pacote range manifest for @google-cloud/storage@^3.0.2 fetched in 471ms
58 silly pacote range manifest for jwa@^1.4.1 fetched in 136ms
59 http fetch GET 304 https://registry.npmjs.org/firebase-functions 742ms (from cache)
60 http fetch GET 304 https://registry.npmjs.org/safe-buffer 86ms (from cache)
61 silly pacote range manifest for firebase-functions@^3.3.0 fetched in 744ms
62 silly pacote range manifest for safe-buffer@^5.0.1 fetched in 90ms
63 http fetch GET 304 https://registry.npmjs.org/@firebase%2fdatabase 532ms (from cache)
64 silly pacote range manifest for @firebase/database@^0.5.1 fetched in 559ms
65 http fetch GET 304 https://registry.npmjs.org/arrify 104ms (from cache)
66 http fetch GET 304 https://registry.npmjs.org/compressible 106ms (from cache)
67 http fetch GET 304 https://registry.npmjs.org/concat-stream 101ms (from cache)
68 silly pacote range manifest for arrify@^2.0.0 fetched in 108ms
69 http fetch GET 304 https://registry.npmjs.org/date-and-time 79ms (from cache)
70 silly pacote range manifest for compressible@^2.0.12 fetched in 111ms
71 silly pacote range manifest for concat-stream@^2.0.0 fetched in 107ms
72 http fetch GET 304 https://registry.npmjs.org/duplexify 84ms (from cache)
73 silly pacote range manifest for date-and-time@^0.10.0 fetched in 90ms
74 silly pacote range manifest for duplexify@^3.5.0 fetched in 95ms
75 http fetch GET 304 https://registry.npmjs.org/extend 70ms (from cache)
76 silly pacote range manifest for extend@^3.0.2 fetched in 73ms
77 http fetch GET 304 https://registry.npmjs.org/gaxios 63ms (from cache)
78 silly pacote range manifest for gaxios@^2.0.1 fetched in 66ms
79 http fetch GET 304 https://registry.npmjs.org/gcs-resumable-upload 67ms (from cache)
80 silly pacote range manifest for gcs-resumable-upload@^2.2.4 fetched in 75ms
81 http fetch GET 304 https://registry.npmjs.org/hash-stream-validation 76ms (from cache)
82 http fetch GET 304 https://registry.npmjs.org/mime 71ms (from cache)
83 silly pacote range manifest for hash-stream-validation@^0.2.1 fetched in 84ms
84 silly pacote range manifest for mime@^2.2.0 fetched in 80ms
85 http fetch GET 304 https://registry.npmjs.org/mime-types 101ms (from cache)
86 silly pacote range manifest for mime-types@^2.0.8 fetched in 108ms
87 http fetch GET 304 https://registry.npmjs.org/onetime 92ms (from cache)
88 silly pacote range manifest for onetime@^5.1.0 fetched in 98ms
89 http fetch GET 304 https://registry.npmjs.org/@google-cloud%2fpaginator 256ms (from cache)
90 silly pacote range manifest for @google-cloud/paginator@^2.0.0 fetched in 263ms
91 http fetch GET 304 https://registry.npmjs.org/p-limit 86ms (from cache)
92 silly pacote range manifest for p-limit@^2.2.0 fetched in 89ms
93 http fetch GET 304 https://registry.npmjs.org/pumpify 89ms (from cache)
94 http fetch GET 304 https://registry.npmjs.org/snakeize 77ms (from cache)
95 silly pacote range manifest for pumpify@^2.0.0 fetched in 93ms
96 silly pacote range manifest for snakeize@^0.1.0 fetched in 80ms
97 http fetch GET 304 https://registry.npmjs.org/readable-stream 89ms (from cache)
98 silly pacote range manifest for readable-stream@^3.4.0 fetched in 97ms
99 http fetch GET 304 https://registry.npmjs.org/stream-events 83ms (from cache)
100 silly pacote range manifest for stream-events@^1.0.1 fetched in 87ms
101 http fetch GET 304 https://registry.npmjs.org/through2 79ms (from cache)
102 http fetch GET 304 https://registry.npmjs.org/buffer-equal-constant-time 63ms (from cache)
103 http fetch GET 304 https://registry.npmjs.org/xdg-basedir 66ms (from cache)
104 silly pacote range manifest for through2@^3.0.0 fetched in 82ms
105 silly pacote version manifest for buffer-equal-constant-time@1.0.1 fetched in 66ms
106 silly pacote range manifest for xdg-basedir@^4.0.0 fetched in 71ms
107 silly pacote range manifest for jsonwebtoken@^8.5.1 fetched in 4ms
108 silly pacote range manifest for lodash@^4.17.14 fetched in 4ms
109 http fetch GET 304 https://registry.npmjs.org/ecdsa-sig-formatter 63ms (from cache)
110 silly pacote version manifest for ecdsa-sig-formatter@1.0.11 fetched in 67ms
111 http fetch GET 304 https://registry.npmjs.org/cors 90ms (from cache)
112 silly pacote range manifest for cors@^2.8.5 fetched in 93ms
113 http fetch GET 304 https://registry.npmjs.org/@types%2fexpress 112ms (from cache)
114 silly pacote range manifest for @types/express@^4.17.0 fetched in 118ms
115 http fetch GET 304 https://registry.npmjs.org/faye-websocket 64ms (from cache)
116 http fetch GET 304 https://registry.npmjs.org/@google-cloud%2ffirestore 889ms (from cache)
117 http fetch GET 304 https://registry.npmjs.org/express 91ms (from cache)
118 silly pacote version manifest for faye-websocket@0.11.3 fetched in 75ms
119 http fetch GET 304 https://registry.npmjs.org/@google-cloud%2fcommon 426ms (from cache)
120 silly pacote range manifest for express@^4.17.1 fetched in 103ms
121 silly pacote range manifest for @google-cloud/firestore@^2.0.0 fetched in 903ms
122 silly pacote range manifest for @google-cloud/common@^2.1.1 fetched in 446ms
123 silly pacote range manifest for readable-stream@^3.0.2 fetched in 9ms
124 http fetch GET 304 https://registry.npmjs.org/@google-cloud%2fpromisify 482ms (from cache)
125 silly pacote range manifest for @google-cloud/promisify@^1.0.0 fetched in 486ms
126 http fetch GET 304 https://registry.npmjs.org/tslib 97ms (from cache)
127 http fetch GET 304 https://registry.npmjs.org/mime-db 93ms (from cache)
128 silly pacote version manifest for tslib@1.10.0 fetched in 101ms
129 silly pacote range manifest for mime-db@>= 1.40.0 < 2 fetched in 98ms
130 silly pacote range manifest for readable-stream@^2.0.0 fetched in 4ms
131 http fetch GET 304 https://registry.npmjs.org/inherits 76ms (from cache)
132 silly pacote range manifest for inherits@^2.0.3 fetched in 80ms
133 http fetch GET 304 https://registry.npmjs.org/typedarray 82ms (from cache)
134 silly pacote range manifest for typedarray@^0.0.6 fetched in 88ms
135 http fetch GET 304 https://registry.npmjs.org/end-of-stream 113ms (from cache)
136 http fetch GET 304 https://registry.npmjs.org/@firebase%2flogger 226ms (from cache)
137 silly fetchPackageMetaData error for @firebase/logger@0.1.28 Unexpected end of JSON input while parsing near '...ogger","version":"0.1'
138 http fetch GET 304 https://registry.npmjs.org/inherits 80ms (from cache)
139 silly pacote range manifest for end-of-stream@^1.0.0 fetched in 120ms
140 http fetch GET 304 https://registry.npmjs.org/stream-shift 73ms (from cache)
141 silly pacote range manifest for inherits@^2.0.1 fetched in 88ms
142 silly pacote range manifest for stream-shift@^1.0.0 fetched in 85ms
143 silly pacote range manifest for gaxios@^2.0.0 fetched in 10ms
144 http fetch GET 304 https://registry.npmjs.org/abort-controller 87ms (from cache)
145 silly pacote range manifest for stream-events@^1.0.4 fetched in 7ms
146 http fetch GET 304 https://registry.npmjs.org/https-proxy-agent 79ms (from cache)
147 silly pacote range manifest for abort-controller@^3.0.0 fetched in 98ms
148 silly pacote range manifest for through2@^2.0.0 fetched in 6ms
149 silly pacote range manifest for https-proxy-agent@^3.0.0 fetched in 87ms
150 silly pacote version manifest for mime-db@1.40.0 fetched in 13ms
151 http fetch GET 304 https://registry.npmjs.org/buffer-from 190ms (from cache)
152 silly pacote range manifest for duplexify@^4.1.1 fetched in 4ms
153 silly pacote range manifest for buffer-from@^1.0.0 fetched in 200ms
154 http fetch GET 304 https://registry.npmjs.org/is-stream 101ms (from cache)
155 silly pacote range manifest for is-stream@^2.0.0 fetched in 106ms
156 http fetch GET 304 https://registry.npmjs.org/node-fetch 86ms (from cache)
157 silly pacote range manifest for node-fetch@^2.3.0 fetched in 88ms
158 http fetch GET 304 https://registry.npmjs.org/@firebase%2futil 320ms (from cache)
159 silly fetchPackageMetaData error for @firebase/util@0.2.31 Unexpected end of JSON input while parsing near '...ia4xnjjyVIPwJaaG4YxyX'
160 silly pacote range manifest for readable-stream@2 || 3 fetched in 3ms
161 http fetch GET 304 https://registry.npmjs.org/google-auth-library 89ms (from cache)
162 silly pacote range manifest for jws@^3.2.2 fetched in 11ms
163 silly pacote range manifest for google-auth-library@^5.0.0 fetched in 97ms
164 silly pacote range manifest for ms@^2.1.1 fetched in 6ms
165 http fetch GET 304 https://registry.npmjs.org/pump 86ms (from cache)
166 http fetch GET 304 https://registry.npmjs.org/p-try 98ms (from cache)
167 http fetch GET 304 https://registry.npmjs.org/string_decoder 81ms (from cache)
168 silly pacote range manifest for pump@^3.0.0 fetched in 90ms
169 silly pacote range manifest for p-try@^2.0.0 fetched in 102ms
170 silly pacote range manifest for string_decoder@^1.1.1 fetched in 86ms
171 http fetch GET 304 https://registry.npmjs.org/util-deprecate 82ms (from cache)
172 silly pacote range manifest for util-deprecate@^1.0.1 fetched in 86ms
173 http fetch GET 304 https://registry.npmjs.org/stubs 79ms (from cache)
174 silly pacote range manifest for stubs@^3.0.0 fetched in 81ms
175 http fetch GET 304 https://registry.npmjs.org/mimic-fn 148ms (from cache)
176 silly pacote range manifest for mimic-fn@^2.1.0 fetched in 151ms
177 http fetch GET 304 https://registry.npmjs.org/object-assign 81ms (from cache)
178 http fetch GET 304 https://registry.npmjs.org/semver 86ms (from cache)
179 silly pacote range manifest for object-assign@^4 fetched in 85ms
180 silly pacote range manifest for semver@^5.6.0 fetched in 92ms
181 http fetch GET 304 https://registry.npmjs.org/vary 75ms (from cache)
182 silly pacote range manifest for vary@^1 fetched in 79ms
183 http fetch GET 304 https://registry.npmjs.org/@types%2fbody-parser 81ms (from cache)
184 http fetch GET 304 https://registry.npmjs.org/@firebase%2fdatabase-types 458ms (from cache)
185 http fetch GET 304 https://registry.npmjs.org/@types%2fexpress-serve-static-core 97ms (from cache)
186 silly pacote range manifest for @types/body-parser@* fetched in 101ms
187 silly pacote version manifest for @firebase/database-types@0.4.6 fetched in 477ms
188 silly pacote range manifest for @types/express-serve-static-core@* fetched in 107ms
189 http fetch GET 304 https://registry.npmjs.org/websocket-driver 98ms (from cache)
190 http fetch GET 304 https://registry.npmjs.org/@types%2fserve-static 107ms (from cache)
191 silly pacote range manifest for websocket-driver@>=0.5.1 fetched in 102ms
192 silly pacote range manifest for @types/serve-static@* fetched in 113ms
193 http fetch GET 304 https://registry.npmjs.org/accepts 93ms (from cache)
194 silly pacote range manifest for accepts@~1.3.7 fetched in 98ms
195 http fetch GET 304 https://registry.npmjs.org/array-flatten 83ms (from cache)
196 http fetch GET 304 https://registry.npmjs.org/body-parser 85ms (from cache)
197 silly pacote version manifest for array-flatten@1.1.1 fetched in 93ms
198 silly pacote version manifest for body-parser@1.19.0 fetched in 91ms
199 http fetch GET 304 https://registry.npmjs.org/content-disposition 96ms (from cache)
200 silly pacote version manifest for content-disposition@0.5.3 fetched in 100ms
201 http fetch GET 304 https://registry.npmjs.org/cookie 76ms (from cache)
202 http fetch GET 304 https://registry.npmjs.org/cookie-signature 75ms (from cache)
203 silly pacote version manifest for cookie@0.4.0 fetched in 80ms
204 silly pacote version manifest for cookie-signature@1.0.6 fetched in 79ms
205 http fetch GET 304 https://registry.npmjs.org/content-type 93ms (from cache)
206 http fetch GET 304 https://registry.npmjs.org/debug 68ms (from cache)
207 silly pacote range manifest for content-type@~1.0.4 fetched in 100ms
208 silly pacote version manifest for debug@2.6.9 fetched in 76ms
209 http fetch GET 304 https://registry.npmjs.org/etag 74ms (from cache)
210 http fetch GET 304 https://registry.npmjs.org/escape-html 79ms (from cache)
211 silly pacote range manifest for etag@~1.8.1 fetched in 81ms
212 silly pacote range manifest for escape-html@~1.0.3 fetched in 85ms
213 http fetch GET 304 https://registry.npmjs.org/encodeurl 98ms (from cache)
214 silly pacote range manifest for encodeurl@~1.0.2 fetched in 102ms
215 http fetch GET 304 https://registry.npmjs.org/fresh 72ms (from cache)
216 http fetch GET 304 https://registry.npmjs.org/finalhandler 80ms (from cache)
217 silly pacote version manifest for fresh@0.5.2 fetched in 75ms
218 silly pacote range manifest for finalhandler@~1.1.2 fetched in 85ms
219 http fetch GET 304 https://registry.npmjs.org/configstore 408ms (from cache)
220 http fetch GET 304 https://registry.npmjs.org/merge-descriptors 78ms (from cache)
221 silly pacote version manifest for merge-descriptors@1.0.1 fetched in 84ms
222 silly pacote range manifest for configstore@^5.0.0 fetched in 414ms
223 silly pacote version manifest for safe-buffer@5.1.2 fetched in 5ms
224 http fetch GET 304 https://registry.npmjs.org/methods 83ms (from cache)
225 http fetch GET 304 https://registry.npmjs.org/on-finished 87ms (from cache)
226 silly pacote range manifest for methods@~1.1.2 fetched in 89ms
227 silly pacote range manifest for on-finished@~2.3.0 fetched in 91ms
228 http fetch GET 304 https://registry.npmjs.org/parseurl 80ms (from cache)
229 silly pacote range manifest for parseurl@~1.3.3 fetched in 86ms
230 http fetch GET 304 https://registry.npmjs.org/path-to-regexp 86ms (from cache)
231 http fetch GET 304 https://registry.npmjs.org/depd 198ms (from cache)
232 http fetch GET 304 https://registry.npmjs.org/proxy-addr 89ms (from cache)
233 silly pacote version manifest for path-to-regexp@0.1.7 fetched in 97ms
234 silly pacote range manifest for depd@~1.1.2 fetched in 209ms
235 silly pacote range manifest for proxy-addr@~2.0.5 fetched in 97ms
236 silly pacote range manifest for vary@~1.1.2 fetched in 21ms
237 http fetch GET 304 https://registry.npmjs.org/qs 110ms (from cache)
238 http fetch GET 304 https://registry.npmjs.org/range-parser 108ms (from cache)
239 silly pacote version manifest for qs@6.7.0 fetched in 116ms
240 silly pacote range manifest for range-parser@~1.2.1 fetched in 115ms
241 http fetch GET 304 https://registry.npmjs.org/send 115ms (from cache)
242 http fetch GET 304 https://registry.npmjs.org/serve-static 112ms (from cache)
243 silly pacote version manifest for send@0.17.1 fetched in 121ms
244 silly pacote version manifest for serve-static@1.14.1 fetched in 122ms
245 http fetch GET 304 https://registry.npmjs.org/setprototypeof 117ms (from cache)
246 http fetch GET 304 https://registry.npmjs.org/statuses 116ms (from cache)
247 silly pacote range manifest for duplexify@^3.6.0 fetched in 11ms
248 silly pacote version manifest for setprototypeof@1.1.1 fetched in 125ms
249 silly pacote range manifest for statuses@~1.5.0 fetched in 125ms
250 silly pacote range manifest for google-auth-library@^5.5.0 fetched in 5ms
251 http fetch GET 304 https://registry.npmjs.org/type-is 108ms (from cache)
252 silly pacote range manifest for type-is@~1.6.18 fetched in 118ms
253 http fetch GET 304 https://registry.npmjs.org/bun 111ms (from cache)
254 silly pacote range manifest for bun@^0.0.12 fetched in 115ms
255 http fetch GET 304 https://registry.npmjs.org/deep-equal 95ms (from cache)
256 silly pacote range manifest for inherits@~2.0.3 fetched in 4ms
257 silly pacote range manifest for deep-equal@^1.0.1 fetched in 100ms
258 http fetch GET 304 https://registry.npmjs.org/functional-red-black-tree 88ms (from cache)
259 silly pacote range manifest for functional-red-black-tree@^1.0.1 fetched in 95ms
260 http fetch GET 304 https://registry.npmjs.org/google-gax 100ms (from cache)
261 silly pacote range manifest for safe-buffer@~5.1.1 fetched in 8ms
262 silly pacote range manifest for google-gax@^1.7.5 fetched in 109ms
263 silly pacote range manifest for string_decoder@~1.1.1 fetched in 7ms
264 silly pacote range manifest for util-deprecate@~1.0.1 fetched in 5ms
265 http fetch GET 304 https://registry.npmjs.org/ent 80ms (from cache)
266 silly pacote range manifest for ent@^2.2.0 fetched in 85ms
267 http fetch GET 304 https://registry.npmjs.org/retry-request 86ms (from cache)
268 silly pacote range manifest for readable-stream@~2.3.6 fetched in 3ms
269 silly pacote range manifest for retry-request@^4.0.0 fetched in 89ms
270 silly pacote range manifest for xtend@~4.0.1 fetched in 6ms
271 http fetch GET 304 https://registry.npmjs.org/teeny-request 92ms (from cache)
272 silly pacote range manifest for debug@^3.1.0 fetched in 6ms
273 silly pacote range manifest for teeny-request@^5.2.1 fetched in 99ms
274 silly pacote range manifest for end-of-stream@^1.4.1 fetched in 5ms
275 http fetch GET 304 https://registry.npmjs.org/core-util-is 84ms (from cache)
276 silly pacote range manifest for readable-stream@^3.1.1 fetched in 4ms
277 silly pacote range manifest for core-util-is@~1.0.0 fetched in 90ms
278 silly pacote range manifest for gaxios@^2.1.0 fetched in 8ms
279 http fetch GET 304 https://registry.npmjs.org/isarray 81ms (from cache)
280 silly pacote range manifest for isarray@~1.0.0 fetched in 86ms
281 http fetch GET 304 https://registry.npmjs.org/process-nextick-args 90ms (from cache)
282 silly pacote range manifest for process-nextick-args@~2.0.0 fetched in 92ms
283 silly pacote range manifest for jws@^3.1.5 fetched in 2ms
284 http fetch GET 304 https://registry.npmjs.org/once 68ms (from cache)
285 silly pacote range manifest for once@^1.4.0 fetched in 72ms
286 http fetch GET 304 https://registry.npmjs.org/event-target-shim 72ms (from cache)
287 silly pacote range manifest for end-of-stream@^1.1.0 fetched in 3ms
288 silly pacote range manifest for event-target-shim@^5.0.0 fetched in 77ms
289 silly pacote range manifest for once@^1.3.1 fetched in 5ms
290 http fetch GET 304 https://registry.npmjs.org/agent-base 66ms (from cache)
291 silly pacote range manifest for safe-buffer@~5.2.0 fetched in 6ms
292 silly pacote range manifest for agent-base@^4.3.0 fetched in 72ms
293 silly pacote range manifest for @types/node@* fetched in 6ms
294 http fetch GET 304 https://registry.npmjs.org/utils-merge 262ms (from cache)
295 silly pacote version manifest for utils-merge@1.0.1 fetched in 267ms
296 http fetch GET 304 https://registry.npmjs.org/base64-js 79ms (from cache)
297 silly pacote range manifest for base64-js@^1.3.0 fetched in 84ms
298 silly pacote range manifest for safe-buffer@>=5.1.0 fetched in 5ms
299 http fetch GET 304 https://registry.npmjs.org/gcp-metadata 76ms (from cache)
300 silly pacote range manifest for gcp-metadata@^3.2.0 fetched in 79ms
301 http fetch GET 304 https://registry.npmjs.org/lru-cache 65ms (from cache)
302 http fetch GET 304 https://registry.npmjs.org/gtoken 75ms (from cache)
303 silly pacote range manifest for lru-cache@^5.0.0 fetched in 69ms
304 silly pacote range manifest for gtoken@^4.1.0 fetched in 81ms
305 silly pacote range manifest for mime-types@~2.1.24 fetched in 4ms
306 http fetch GET 304 https://registry.npmjs.org/fast-text-encoding 105ms (from cache)
307 silly pacote range manifest for fast-text-encoding@^1.0.0 fetched in 108ms
308 http fetch GET 304 https://registry.npmjs.org/@types%2fconnect 104ms (from cache)
309 silly pacote range manifest for @types/connect@* fetched in 116ms
310 http fetch GET 304 https://registry.npmjs.org/http-parser-js 93ms (from cache)
311 silly pacote range manifest for http-parser-js@>=0.4.0 <0.4.11 fetched in 102ms
312 http fetch GET 304 https://registry.npmjs.org/websocket-extensions 100ms (from cache)
313 http fetch GET 304 https://registry.npmjs.org/@types%2frange-parser 129ms (from cache)
314 silly pacote range manifest for @types/range-parser@* fetched in 132ms
315 silly pacote range manifest for websocket-extensions@>=0.1.1 fetched in 103ms
316 http fetch GET 304 https://registry.npmjs.org/negotiator 89ms (from cache)
317 http fetch GET 304 https://registry.npmjs.org/@types%2fmime 100ms (from cache)
318 http fetch GET 304 https://registry.npmjs.org/bytes 88ms (from cache)
319 silly pacote range manifest for type-is@~1.6.17 fetched in 3ms
320 silly pacote version manifest for ms@2.0.0 fetched in 5ms
321 http fetch GET 304 https://registry.npmjs.org/http-errors 88ms (from cache)
322 silly pacote version manifest for negotiator@0.6.2 fetched in 96ms
323 silly pacote range manifest for @types/mime@* fetched in 107ms
324 silly pacote version manifest for bytes@3.1.0 fetched in 95ms
325 silly pacote version manifest for http-errors@1.7.2 fetched in 93ms
326 http fetch GET 304 https://registry.npmjs.org/iconv-lite 58ms (from cache)
327 silly pacote version manifest for iconv-lite@0.4.24 fetched in 60ms
328 http fetch GET 304 https://registry.npmjs.org/raw-body 68ms (from cache)
329 silly pacote version manifest for raw-body@2.4.0 fetched in 79ms
330 http fetch GET 304 https://registry.npmjs.org/unpipe 65ms (from cache)
331 http fetch GET 304 https://registry.npmjs.org/@google-cloud%2fprojectify 390ms (from cache)
332 silly pacote range manifest for unpipe@~1.0.0 fetched in 73ms
333 silly pacote range manifest for @google-cloud/projectify@^1.0.0 fetched in 398ms
334 http fetch GET 304 https://registry.npmjs.org/dot-prop 85ms (from cache)
335 http fetch GET 304 https://registry.npmjs.org/graceful-fs 86ms (from cache)
336 silly pacote range manifest for dot-prop@^5.1.0 fetched in 89ms
337 http fetch GET 304 https://registry.npmjs.org/unique-string 87ms (from cache)
338 silly pacote range manifest for graceful-fs@^4.1.2 fetched in 90ms
339 silly pacote range manifest for http-errors@~1.7.2 fetched in 3ms
340 http fetch GET 304 https://registry.npmjs.org/write-file-atomic 86ms (from cache)
341 http fetch GET 304 https://registry.npmjs.org/make-dir 91ms (from cache)
342 silly pacote range manifest for unique-string@^2.0.0 fetched in 91ms
343 silly pacote version manifest for mime@1.6.0 fetched in 5ms
344 http fetch GET 304 https://registry.npmjs.org/ee-first 71ms (from cache)
345 silly pacote version manifest for ms@2.1.1 fetched in 5ms
346 silly pacote range manifest for write-file-atomic@^3.0.0 fetched in 92ms
347 silly pacote range manifest for make-dir@^3.0.0 fetched in 96ms
348 silly pacote range manifest for readable-stream@~1.0.32 fetched in 6ms
349 silly pacote version manifest for ee-first@1.1.1 fetched in 81ms
350 http fetch GET 304 https://registry.npmjs.org/ipaddr.js 58ms (from cache)
351 silly pacote version manifest for ipaddr.js@1.9.0 fetched in 59ms
352 http fetch GET 304 https://registry.npmjs.org/destroy 56ms (from cache)
353 silly pacote range manifest for destroy@~1.0.4 fetched in 58ms
354 http fetch GET 304 https://registry.npmjs.org/forwarded 76ms (from cache)
355 silly pacote range manifest for forwarded@~0.1.2 fetched in 83ms
356 http fetch GET 304 https://registry.npmjs.org/is-arguments 68ms (from cache)
357 http fetch GET 304 https://registry.npmjs.org/media-typer 74ms (from cache)
358 silly pacote range manifest for is-arguments@^1.0.4 fetched in 73ms
359 silly pacote version manifest for media-typer@0.3.0 fetched in 79ms
360 http fetch GET 304 https://registry.npmjs.org/object-is 74ms (from cache)
361 http fetch GET 304 https://registry.npmjs.org/is-date-object 77ms (from cache)
362 http fetch GET 304 https://registry.npmjs.org/object-keys 69ms (from cache)
363 silly pacote range manifest for object-is@^1.0.1 fetched in 78ms
364 silly pacote range manifest for is-date-object@^1.0.1 fetched in 81ms
365 silly pacote range manifest for object-keys@^1.1.1 fetched in 76ms
366 silly pacote range manifest for node-fetch@^2.6.0 fetched in 6ms
367 http fetch GET 304 https://registry.npmjs.org/regexp.prototype.flags 63ms (from cache)
368 silly pacote range manifest for semver@^6.0.0 fetched in 7ms
369 silly pacote range manifest for regexp.prototype.flags@^1.2.0 fetched in 68ms
370 http fetch GET 304 https://registry.npmjs.org/is-regex 99ms (from cache)
371 silly pacote range manifest for safe-buffer@~5.1.0 fetched in 4ms
372 silly pacote range manifest for is-regex@^1.0.4 fetched in 103ms
373 silly pacote range manifest for debug@^4.1.1 fetched in 2ms
374 silly pacote range manifest for through2@^3.0.1 fetched in 2ms
375 silly pacote range manifest for node-fetch@^2.2.0 fetched in 4ms
376 silly pacote range manifest for stream-events@^1.0.5 fetched in 2ms
377 http fetch GET 304 https://registry.npmjs.org/is-stream-ended 54ms (from cache)
378 http fetch GET 304 https://registry.npmjs.org/lodash.at 54ms (from cache)
379 silly pacote range manifest for is-stream-ended@^0.1.4 fetched in 56ms
380 http fetch GET 304 https://registry.npmjs.org/lodash.has 49ms (from cache)
381 silly pacote range manifest for lodash.at@^4.6.0 fetched in 56ms
382 silly pacote range manifest for lodash.has@^4.5.2 fetched in 52ms
383 http fetch GET 304 https://registry.npmjs.org/walkdir 55ms (from cache)
384 silly pacote range manifest for walkdir@^0.4.0 fetched in 57ms
385 http fetch GET 304 https://registry.npmjs.org/protobufjs 67ms (from cache)
386 silly pacote range manifest for protobufjs@^6.8.8 fetched in 75ms
387 http fetch GET 304 https://registry.npmjs.org/uuid 60ms (from cache)
388 silly pacote range manifest for uuid@^3.3.2 fetched in 64ms
389 silly pacote version manifest for inherits@2.0.3 fetched in 3ms
390 silly pacote range manifest for statuses@>= 1.5.0 < 2 fetched in 3ms
391 http fetch GET 304 https://registry.npmjs.org/wrappy 67ms (from cache)
392 http fetch GET 304 https://registry.npmjs.org/es6-promisify 66ms (from cache)
393 silly pacote range manifest for wrappy@1 fetched in 73ms
394 http fetch GET 304 https://registry.npmjs.org/json-bigint 79ms (from cache)
395 silly pacote range manifest for es6-promisify@^5.0.0 fetched in 82ms
396 silly pacote range manifest for json-bigint@^0.3.0 fetched in 87ms
397 silly pacote version manifest for unpipe@1.0.0 fetched in 8ms
398 silly pacote version manifest for inherits@2.0.4 fetched in 2ms
399 http fetch GET 304 https://registry.npmjs.org/yallist 90ms (from cache)
400 silly pacote range manifest for yallist@^3.0.2 fetched in 92ms
401 http fetch GET 304 https://registry.npmjs.org/toidentifier 67ms (from cache)
402 http fetch GET 304 https://registry.npmjs.org/@grpc%2fgrpc-js 218ms (from cache)
403 silly pacote version manifest for toidentifier@1.0.0 fetched in 69ms
404 silly pacote version manifest for @grpc/grpc-js@0.6.9 fetched in 221ms
405 http fetch GET 304 https://registry.npmjs.org/google-p12-pem 101ms (from cache)
406 silly pacote range manifest for google-p12-pem@^2.0.0 fetched in 105ms
407 http fetch GET 304 https://registry.npmjs.org/crypto-random-string 68ms (from cache)
408 http fetch GET 304 https://registry.npmjs.org/safer-buffer 93ms (from cache)
409 http fetch GET 304 https://registry.npmjs.org/is-obj 78ms (from cache)
410 silly pacote range manifest for crypto-random-string@^2.0.0 fetched in 72ms
411 silly pacote range manifest for safer-buffer@>= 2.1.2 < 3 fetched in 99ms
412 silly pacote range manifest for is-obj@^2.0.0 fetched in 87ms
413 silly pacote version manifest for isarray@0.0.1 fetched in 7ms
414 silly pacote range manifest for string_decoder@~0.10.x fetched in 7ms
415 silly pacote range manifest for inherits@~2.0.1 fetched in 6ms
416 http fetch GET 304 https://registry.npmjs.org/imurmurhash 76ms (from cache)
417 silly pacote range manifest for imurmurhash@^0.1.4 fetched in 83ms
418 http fetch GET 304 https://registry.npmjs.org/is-typedarray 76ms (from cache)
419 http fetch GET 304 https://registry.npmjs.org/@firebase%2fapp-types 572ms (from cache)
420 http fetch GET 304 https://registry.npmjs.org/signal-exit 90ms (from cache)
421 silly pacote version manifest for @firebase/app-types@0.4.6 fetched in 586ms
422 silly pacote range manifest for is-typedarray@^1.0.0 fetched in 92ms
423 silly pacote range manifest for signal-exit@^3.0.2 fetched in 94ms
424 http fetch GET 304 https://registry.npmjs.org/typedarray-to-buffer 88ms (from cache)
425 silly pacote range manifest for typedarray-to-buffer@^3.1.5 fetched in 91ms
426 http fetch GET 304 https://registry.npmjs.org/http-proxy-agent 262ms (from cache)
427 silly pacote range manifest for http-proxy-agent@^2.1.0 fetched in 264ms
428 http fetch GET 304 https://registry.npmjs.org/define-properties 63ms (from cache)
429 silly pacote range manifest for define-properties@^1.1.2 fetched in 66ms
430 http fetch GET 304 https://registry.npmjs.org/has 69ms (from cache)
431 silly pacote range manifest for has@^1.0.1 fetched in 70ms
432 http fetch GET 304 https://registry.npmjs.org/@grpc%2fproto-loader 393ms (from cache)
433 silly pacote range manifest for @grpc/proto-loader@^0.5.1 fetched in 394ms
434 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2faspromise 213ms (from cache)
435 silly pacote range manifest for @protobufjs/aspromise@^1.1.2 fetched in 215ms
436 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2feventemitter 204ms (from cache)
437 silly pacote range manifest for @protobufjs/eventemitter@^1.1.0 fetched in 205ms
438 silly pacote range manifest for @types/node@^10.1.0 fetched in 6ms
439 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2fcodegen 221ms (from cache)
440 silly pacote range manifest for @protobufjs/codegen@^2.0.4 fetched in 222ms
441 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2finquire 216ms (from cache)
442 silly pacote range manifest for @protobufjs/inquire@^1.1.0 fetched in 217ms
443 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2ffloat 232ms (from cache)
444 http fetch GET 304 https://registry.npmjs.org/@types%2flong 62ms (from cache)
445 silly pacote range manifest for @protobufjs/float@^1.0.2 fetched in 234ms
446 silly pacote range manifest for @types/long@^4.0.0 fetched in 64ms
447 silly pacote range manifest for semver@^6.2.0 fetched in 1ms
448 silly pacote range manifest for node-forge@^0.9.0 fetched in 2ms
449 silly pacote range manifest for agent-base@4 fetched in 4ms
450 silly pacote version manifest for debug@3.1.0 fetched in 3ms
451 silly pacote range manifest for object-keys@^1.0.12 fetched in 3ms
452 http fetch GET 304 https://registry.npmjs.org/es6-promise 53ms (from cache)
453 http fetch GET 304 https://registry.npmjs.org/long 65ms (from cache)
454 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2fpath 249ms (from cache)
455 silly pacote range manifest for es6-promise@^4.0.3 fetched in 57ms
456 silly pacote range manifest for long@^4.0.0 fetched in 69ms
457 silly pacote range manifest for @protobufjs/path@^1.1.2 fetched in 252ms
458 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2fbase64 298ms (from cache)
459 silly pacote range manifest for protobufjs@^6.8.6 fetched in 3ms
460 silly pacote range manifest for @protobufjs/base64@^1.1.2 fetched in 302ms
461 http fetch GET 304 https://registry.npmjs.org/bignumber.js 46ms (from cache)
462 silly pacote range manifest for bignumber.js@^7.0.0 fetched in 49ms
463 http fetch GET 304 https://registry.npmjs.org/function-bind 52ms (from cache)
464 silly pacote range manifest for function-bind@^1.1.1 fetched in 53ms
465 http fetch GET 304 https://registry.npmjs.org/lodash.camelcase 51ms (from cache)
466 silly pacote range manifest for lodash.camelcase@^4.3.0 fetched in 52ms
467 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2futf8 245ms (from cache)
468 silly pacote range manifest for @protobufjs/utf8@^1.1.0 fetched in 246ms
469 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2fpool 332ms (from cache)
470 silly pacote range manifest for @protobufjs/pool@^1.1.0 fetched in 334ms
471 http fetch GET 304 https://registry.npmjs.org/@protobufjs%2ffetch 408ms (from cache)
472 silly pacote range manifest for @protobufjs/fetch@^1.1.0 fetched in 409ms
473 silly pacote range manifest for @protobufjs/aspromise@^1.1.1 fetched in 2ms
474 silly pacote range manifest for firebase-admin@^8.6.0 fetched in 2ms
475 silly resolveWithNewModule firebase-admin@8.6.1 checking installable status
476 silly pacote range manifest for firebase-functions@^3.3.0 fetched in 5ms
477 silly resolveWithNewModule firebase-functions@3.3.0 checking installable status
478 silly pacote range manifest for @firebase/database@^0.5.1 fetched in 13ms
479 silly resolveWithNewModule @firebase/database@0.5.9 checking installable status
480 silly pacote range manifest for @types/node@^8.0.53 fetched in 13ms
481 silly resolveWithNewModule @types/node@8.10.56 checking installable status
482 silly pacote range manifest for dicer@^0.3.0 fetched in 14ms
483 silly resolveWithNewModule dicer@0.3.0 checking installable status
484 silly pacote version manifest for jsonwebtoken@8.1.0 fetched in 14ms
485 silly resolveWithNewModule jsonwebtoken@8.1.0 checking installable status
486 silly pacote version manifest for node-forge@0.7.4 fetched in 15ms
487 silly resolveWithNewModule node-forge@0.7.4 checking installable status
488 silly pacote range manifest for @google-cloud/storage@^3.0.2 fetched in 15ms
489 silly resolveWithNewModule @google-cloud/storage@3.5.0 checking installable status
490 silly pacote range manifest for @google-cloud/firestore@^2.0.0 fetched in 16ms
491 silly resolveWithNewModule @google-cloud/firestore@2.5.0 checking installable status
492 silly pacote version manifest for @firebase/database-types@0.4.6 fetched in 5ms
493 silly resolveWithNewModule @firebase/database-types@0.4.6 checking installable status
494 silly pacote version manifest for tslib@1.10.0 fetched in 4ms
495 silly resolveWithNewModule tslib@1.10.0 checking installable status
496 silly pacote version manifest for faye-websocket@0.11.3 fetched in 5ms
497 silly resolveWithNewModule faye-websocket@0.11.3 checking installable status
498 http fetch GET 304 https://registry.npmjs.org/@firebase%2flogger 227ms (from cache)
499 silly fetchPackageMetaData error for @firebase/logger@0.1.28 Unexpected end of JSON input while parsing near '...ogger","version":"0.1'
500 http fetch GET 304 https://registry.npmjs.org/@firebase%2futil 293ms (from cache)
501 silly fetchPackageMetaData error for @firebase/util@0.2.31 Unexpected end of JSON input while parsing near '...ia4xnjjyVIPwJaaG4YxyX'
502 timing stage:rollbackFailedOptional Completed in 0ms
503 timing stage:runTopLevelLifecycles Completed in 3404ms
504 silly saveTree functions@
504 silly saveTree +-- firebase-admin@8.6.1
504 silly saveTree | +-- @firebase/database@0.5.9
504 silly saveTree | | +-- @firebase/database-types@0.4.6
504 silly saveTree | | +-- faye-websocket@0.11.3
504 silly saveTree | | `-- tslib@1.10.0
504 silly saveTree | +-- @google-cloud/firestore@2.5.0
504 silly saveTree | +-- @google-cloud/storage@3.5.0
504 silly saveTree | +-- @types/node@8.10.56
504 silly saveTree | +-- dicer@0.3.0
504 silly saveTree | +-- jsonwebtoken@8.1.0
504 silly saveTree | `-- node-forge@0.7.4
504 silly saveTree `-- firebase-functions@3.3.0
505 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...ogger","version":"0.1'
505 verbose stack     at JSON.parse (<anonymous>)
505 verbose stack     at parseJson (C:\Users\Yunfa\AppData\Roaming\npm\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
505 verbose stack     at consumeBody.call.then.buffer (C:\Users\Yunfa\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
505 verbose stack     at process._tickCallback (internal/process/next_tick.js:68:7)
506 verbose cwd D:\GitHub\Live-Message-Product\Firebase\functions
507 verbose Windows_NT 10.0.18362
508 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Yunfa\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
509 verbose node v10.16.3
510 verbose npm  v6.12.0
511 error Unexpected end of JSON input while parsing near '...ogger","version":"0.1'
512 verbose exit [ 1, true ]

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)

google-oss-bot commented 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.

ArbestNew commented 4 years ago

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.

ArbestNew commented 4 years ago

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] 
ArbestNew commented 4 years ago

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.

  1. npm cache clean --force
  2. npm uninstall firebase-tools -g
  3. npm install -g firebase-tools
  4. firebase init (No issue any more)

I don't know if I should close this issue, I will leave this right to your team right now,

samtstern commented 4 years ago

@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.