fullstack-hy2020 / fullstack-hy2020.github.io

https://fullstack-hy2020.github.io
Other
1.54k stars 3.89k forks source link

Part 2: json-server no longer supports ID of type int #3676

Closed uglyhott closed 3 months ago

uglyhott commented 3 months ago

Hi there,

The command npm install json-server --save-dev now installs the 1.0.0-beta.1 which includes a notable breaking change.

From the json-server docs:

id is always a string and will be generated for you if missing

This caused me to go on a bit of a hunt for answers and others seem to be having the same issue on the Discord channel.

I'm not sure if you'd rather update the npm section where it is first mentioned to: npm install -g json-server@0.17.4

Or if you would rather update the rest of the course, images, etc, to reflect the change to manually adding the ID as a string or letting the server generate it for you.

See relevant PR #3450

Thanks for all the work!

mluukkai commented 3 months ago

fixed