You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
SyntaxError: Unexpected token in JSON at position 0
at JSON.parse ()
at /Users/ralf/Documents/GitHub/firebase/import.js:40:22
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
Hi, Great work... This was just what I needed :-)
I get the following error when trying to import. Export works fine.
Hope you can help.
$ node import.js import-to-firestore.json
undefined:1
{
^
SyntaxError: Unexpected token in JSON at position 0
at JSON.parse ()
at /Users/ralf/Documents/GitHub/firebase/import.js:40:22
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
JSON is just for testing a looks like:
{
"songList": {
"FpVWamw6LKfxhsdBaNsd": {
"artistName": "Muse",
"albumName": "The Nightwatcher",
"id": "FpVWamw6LKfxhsdBaNsd",
"songName": "Sweet Home Alabama",
"songDescription": "Deep trouble"
},
"PFJJaHZtM53V71na6vM5": {
"songDescription": "Desc",
"artistName": "Queen",
"albumName": "Boehemiam Rapsody",
"id": "PFJJaHZtM53V71na6vM5",
"songName": "Radio Gaga"
},
"WqMHifsWETX3CpiyDjft": {
"songDescription": "Germany",
"artistName": "Madonna",
"albumName": "Summer",
"id": "WqMHifsWETX3CpiyDjft",
"songName": "Like a Prayer"
},
"g9Eja99SlX1EywEMOhOk": {
"songDescription": "About winning",
"artistName": "Queen",
"albumName": "Best of Queen",
"id": "g9Eja99SlX1EywEMOhOk",
"songName": "We are the Champions"
},
"mgNDi0p4FUKFaMJ7Oo7m": {
"songDescription": "Ghost Town - desc",
"artistName": "Adam Lampert",
"albumName": "Best of",
"id": "mgNDi0p4FUKFaMJ7Oo7m",
"songName": "Ghost Town"
},
"kklnILJMKMHLKMLKJNnk": {
"songDescription": "Norwegian band",
"artistName": "AHA",
"albumName": "Fjeldaberne",
"id": "123456789",
"songName": "Take on me"
}
}
}
The text was updated successfully, but these errors were encountered: