typicode / json-server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)
Other
73.03k stars 7.02k forks source link

error "EINVAL: invalid argument" after POST #810

Open philipp323 opened 6 years ago

philipp323 commented 6 years ago

$ POST /member 201 11.120 ms - 160 Error reading EINVAL: invalid argument, open '' Read error has been fixed :)

I'm always getting this error after POSTING a new object to the file (server)... I'm using JS -> XMLHttpRequests..

Thanks in advance!

penumbra1 commented 6 years ago

Same here. I'm using WSL bash in VSCode on Windows 10, maybe that has something to do with it? It also appears on PUT:

PUT /todos/30098 200 27.031 ms - 67
  Error reading /mnt/c/Code/Egghead/react-todo/db.json
EINVAL: invalid argument, open '/mnt/c/Code/Egghead/react-todo/db.json'
  Read error has been fixed :)

Doesn't break anything though. Just a nuisance:)

krimple commented 5 years ago

I got this too. On windows with WSL, node v11.4.0 using nvm.