firebase-import icon indicating copy to clipboard operation
firebase-import copied to clipboard

TypeError: Cannot read property 'length' of undefined

Open orcunozbay opened this issue 7 years ago • 5 comments

size += JSON.stringify(value).length; ^

TypeError: Cannot read property 'length' of undefined

orcunozbay avatar Jun 30 '18 12:06 orcunozbay

Getting the same error.

`Preparing JSON for import... (may take a minute) /usr/local/lib/node_modules/firebase-import/bin/firebase-import.js:199 size += JSON.stringify(value).length; ^

TypeError: Cannot read property 'length' of undefined at chunkInternal (/usr/local/lib/node_modules/firebase-import/bin/firebase-import.js:199:34) at createChunks (/usr/local/lib/node_modules/firebase-import/bin/firebase-import.js:169:18) at Stream. (/usr/local/lib/node_modules/firebase-import/bin/firebase-import.js:147:18) at emitOne (events.js:101:20) at Stream.emit (events.js:188:7) at Parser.parser.onError (/usr/local/lib/node_modules/firebase-import/node_modules/JSONStream/index.js:140:12) at Parser.proto.charError (/usr/local/lib/node_modules/firebase-import/node_modules/jsonparse/jsonparse.js:90:8) at Parser.proto.write (/usr/local/lib/node_modules/firebase-import/node_modules/jsonparse/jsonparse.js:154:23) at Stream. (/usr/local/lib/node_modules/firebase-import/node_modules/JSONStream/index.js:21:12) at Stream.stream.write (/usr/local/lib/node_modules/firebase-import/node_modules/through/index.js:26:11)`

dougdot3 avatar Jul 27 '18 14:07 dougdot3

@dougdot3 @orcunozbay try loading your file using the below.

What is the output?

$ cat test.js var data = require('./testFile.json') console.log(data.length)

$ node test.js 12054

siege-nnn avatar Aug 10 '18 12:08 siege-nnn

Same issue

Shery11 avatar Dec 18 '18 19:12 Shery11

did anyone ever figure this out?

smacnabb3 avatar Jan 21 '19 02:01 smacnabb3

Mesmo Problema. Isso não funciona.

oseiasgomes avatar Apr 03 '20 01:04 oseiasgomes