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 tested these codes which copied on https://github.com/typicode/json-server/tree/v0
but something wrong
(base) PS T:\router> json-server --version
1.0.0-alpha.23
(base) PS T:\router> json-server http://jsonplaceholder.typicode.com/db
File http://jsonplaceholder.typicode.com/db not found
(base) PS T:\router> json-server --watch db.js
--watch/-w can be omitted, JSON Server 1+ watches for file changes by default
undefined:1
module.exports = () => {
^
SyntaxError: Unexpected token m in JSON at position 0
at JSONFile.parse (<anonymous>)
at JSONFile.read (file:///T:/myDev/env/nvm1.1.10/v18.19.0/node_modules/json-server/node_modules/lowdb/lib/adapters/node/DataFile.js:17:31)
at async Observer.read (file:///T:/myDev/env/nvm1.1.10/v18.19.0/node_modules/json-server/lib/observer.js:21:22)
at async Low.read (file:///T:/myDev/env/nvm1.1.10/v18.19.0/node_modules/json-server/node_modules/lowdb/lib/core/Low.js:16:22)
at async file:///T:/myDev/env/nvm1.1.10/v18.19.0/node_modules/json-server/lib/bin.js:114:1
Node.js v18.19.0
The text was updated successfully, but these errors were encountered:
it doesn't work on xxx.js or remote url,though xxx.json is ok
does anyone have the same problem as mine?
my Node.js:v18.19.0
this is a .js file in my work folder.
i tested these codes which copied on
https://github.com/typicode/json-server/tree/v0
but something wrong
The text was updated successfully, but these errors were encountered: