deploy sveltekit: nixpacks stream did not contain valid UTF-8

Hi, I deploy my sveltekit project but I have the error below. What is the issue please? Error logs: ============== Using Nixpacks ============== context: 9eac5891d93a9179fe251a2d7a841575 Nixpacks build failed Error: Error reading static/js/bootstrap.bundle.min.js Caused by: stream did not contain valid UTF-8
10 Replies
Percy
Percy2y ago
Project ID: d7afdbc4-93fd-4b7a-bcd8-87fffb54273f
Percy
Percy2y ago
You might find these helpful: - Error in deploy a proyect - error in a deploy proyect
⚠️ experimental feature
dalton57918
dalton57918OP2y ago
d7afdbc4-93fd-4b7a-bcd8-87fffb54273f
Brody
Brody2y ago
Caused by: stream did not contain valid UTF-8 check the encoding of that file
dalton57918
dalton57918OP2y ago
I will have to encode all my files in utf 8? It works well localy
Brody
Brody2y ago
yes everything should be utf-8 ^
Finn
Finn2y ago
open the file and save it as utf8 oops discord moment the chat was empty when i typed that
dalton57918
dalton57918OP2y ago
I created a c# script to bulkconvert my js files try { string[] files = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories); foreach (var file in files) { string text = File.ReadAllText(file); Encoding encoding = Encoding.UTF8; Console.WriteLine("Encoding: {0}", encoding.EncodingName); StreamWriter streamWriter = new StreamWriter(file, false, encoding); streamWriter.Write(text); streamWriter.Close(); Console.WriteLine("Encoding: {0}", encoding.EncodingName); Console.WriteLine(); Console.WriteLine(); } } catch(Exception ex) { Console.WriteLine(ex.Message); } Console.WriteLine("Bye!");
Finn
Finn2y ago
sturdy
Brody
Brody2y ago
I'd be interested to know why your files weren't utf-8 to begin with?
Want results from more Discord servers?
Add your server