I’m starting learning laravel, but when I try to setup the project with composer I get encoding error
“In JsonFile.php line 328:
JSON encoding failed: Malformed UTF-8 characters, possibly incorrectly encoded”
when I use the command ‘composer create-project laravel/laravel backend’
I tried to reinstall composer, php and change the encoding of vscode but it doesnt make sense I’m literally setting up the project.
Composer update just today, maybe it broke something, and i dont find where is that JsonFile.php…
In the terminal of vscode, inside my project folder
I init the composer, then I require laravel with
composer require laravel/framework:^11.*
After that i try to create the project with
composer create-project laravel/laravel backend
In the composer i have just the laravel require:
{
"require": {
"laravel/framework": "11.*"
}
}
I also tried to create as in the laravel documentation with
laravel new backend
But I get the same error:
JSON encoding failed: Malformed UTF-8 characters, possibly incorrectly encoded
Halifax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
5