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
I know this issue is closed, but I was able to work around this. With the json-server already running, if I update my db.json file with an array of strings as shown above and save, it refreshes and adds the endpoint just fine. However if you stop json-server and try to start with that modified db.json, you get the error mentioned.
定义字符串数组,如:
{
"list": ["a", "b", "c"]
}
执行json-server --watch的时候报错:
item['id'] = randomId();TypeError: Cannot create property 'id' on string 'a'
版本:1.0.0 -alpha.22
The text was updated successfully, but these errors were encountered: