Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChase Edlefsen
1,566 PointsError code 255 when running composer create-project --prefer-dist laravel/laravel=^6 treehouse
Hello,
I am getting the following 255 error code in Terminal when running the following command to install laravel:
composer create-project --prefer-dist laravel/laravel=^6 treehouse
The full error description is below with the file path updated with "omitted" for any private info:
In Collection.php line 11:
During inheritance of ArrayAccess: Uncaught ErrorException: Return type of
Illuminate\Support\Collection::offsetExists($key) should either be compatib
le with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTyp
eWillChange] attribute should be used to temporarily suppress the notice in
/Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/Sup
port/Collection.php:1277
Stack trace:
#0 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/S
upport/Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions
->handleError(8192, 'Return type of ...', '/Users/omitted...', 1277)
#1 /Users/omitted/treehouse/vendor/composer/ClassLoader.php(582): inc
lude('/Users/omitted...')
#2 /Users/omitted/treehouse/vendor/composer/ClassLoader.php(433): Com
poser\Autoload{closure}('/Users/omitted...')
#3 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/S
upport/helpers.php(109): Composer\Autoload\ClassLoader->loadClass('Illumina
te\Supp...')
#4 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/F
oundation/PackageManifest.php(130): collect(Array)
#5 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/F
oundation/PackageManifest.php(106): Illuminate\Foundation\PackageManifest->
build()
#6 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/F
oundation/PackageManifest.php(89): Illuminate\Foundation\PackageManifest->g
etManifest()
#7 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/F
oundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest->c
onfig('aliases')
#8 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/F
oundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageM
anifest->aliases()
#9 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/F
oundation/Application.php(219): Illuminate\Foundation\Bootstrap\RegisterFac
ades->bootstrap(Object(Illuminate\Foundation\Application))
#10 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/
Foundation/Console/Kernel.php(320): Illuminate\Foundation\Application->boot
strapWith(Array)
#11 /Users/omitted/treehouse/vendor/laravel/framework/src/Illuminate/
Foundation/Console/Kernel.php(129): Illuminate\Foundation\Console\Kernel->b
ootstrap()
#12 /Users/omitted/treehouse/artisan(35): Illuminate\Foundation\Conso
le\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object
(Symfony\Component\Console\Output\ConsoleOutput))
#13 {main}
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
I was able to still open the directory in Visual Studio with no issues but wanted to make sure this won't cause any issues, as I would imagine it would. Any assistance is much appreciated.