(✅: upgrade node from v22.7.0) seedDatabase UTF8 e...
# support
s
Hi team! Getting a new maching set up and running into an error when [seeding the FHIR definitions](https://github.com/medplum/medplum/blob/5159e47a35ab9a6c267ae28e2284b12bb8dc11f9/packages/server/src/seeds/structuredefinitions.ts#L16). I am following the [Run the Stack](https://www.medplum.com/docs/contributing/run-the-stack) instructions. When standing up the server, after all of the "Database schema migration" logs, I get an error
"msg":"Database error","error":"invalid byte sequence for encoding \"UTF8\": 0xa9"
. I see from the code that these FHIR resources do contain characters like ©. The postgres database is created with encoding UTF8 and it seems like the files are being read with that encoding. I am running off latest commit
5159e47a3
. Before hacking further, thought I would see if I'm missing something. Thanks!
also, just a note that that any failure in this block will succeed on retry because the db will be considered seeded but is missing these resources. but it’ll be a rare and obvious failure mode
the issue was in node v22.7.0 - [UTF+8 encodings are broken #54543](https://github.com/nodejs/node/issues/54543) 🙃 ... scary stuff. thoughts and prayers to anyone coming across this and debugging production data corruption. marking as solved.
r
Thank you for sharing thsi @scrooge_online
I hope it is a resource for the rest of the community!