3
respostas

ao tentar executar o php artisan serve - no Mac

MacBook-Pro-de-Felipe:estoque felipe$ php artisan serve

Warning: require(/Users/felipe/Alura/laravel/estoque/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /Users/felipe/Alura/laravel/estoque/bootstrap/autoload.php on line 17

Fatal error: require(): Failed opening required '/Users/felipe/Alura/laravel/estoque/bootstrap/../vendor/autoload.php' (include_path='.:') in /Users/felipe/Alura/laravel/estoque/bootstrap/autoload.php on line 17

3 respostas

Oi Felipe, tudo bom?

As vezes faltou alguma dependencia no seu projeto.

Tenta rodar o comando:

composer update

Caso esse de algum problema, tenta:

composer update --no-scripts

Qualquer problema, compartilha com a gente =)

Abraço e bons estudos!

O meu mesmo fazendo update ainda deu erro:

Whoops, looks like something went wrong. 1/1 ErrorException in Encrypter.php line 303: Function mcrypt_get_iv_size() is deprecated

in Encrypter.php line 303 at HandleExceptions->handleError('8192', 'Function mcrypt_get_iv_size() is deprecated', 'C:\Users\guilherme.nascimento\Desktop\Guilherme\laravel\estoque\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php', '303', array()) in Encrypter.php line 303 at Encrypter->updateBlockSize() in Encrypter.php line 280 at Encrypter->setCipher('rijndael-128') in EncryptionServiceProvider.php line 20 at EncryptionServiceProvider->Illuminate\Encryption{closure}(object(Application), array()) in Container.php line 776 at Container->build(object(Closure), array()) in Container.php line 659 at Container->make('encrypter', array()) in Application.php line 644 at Application->make('encrypter') in Container.php line 890 at Container->resolveClass(object(ReflectionParameter)) in Container.php line 851 at Container->getDependencies(array(object(ReflectionParameter)), array()) in Container.php line 815 at Container->build('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Container.php line 659 at Container->make('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Application.php line 644 at Application->make('Illuminate\Cookie\Middleware\EncryptCookies') in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in CheckForMaintenanceMode.php line 42 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 125 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 100 at Pipeline->then(object(Closure)) in Kernel.php line 115 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84 at Kernel->handle(object(Request)) in index.php line 52 at require_once('C:\Users\guilherme.nascimento\Desktop\Guilherme\laravel\estoque\public\index.php') in server.php line 21

Whoops, looks like something went wrong. 1/1 ErrorException in Encrypter.php line 303: Function mcrypt_get_iv_size() is deprecated

in Encrypter.php line 303 at HandleExceptions->handleError('8192', 'Function mcrypt_get_iv_size() is deprecated', 'C:\Users\guilherme.nascimento\Desktop\Guilherme\laravel\estoque\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php', '303', array()) in Encrypter.php line 303 at Encrypter->updateBlockSize() in Encrypter.php line 280 at Encrypter->setCipher('rijndael-128') in EncryptionServiceProvider.php line 20 at EncryptionServiceProvider->Illuminate\Encryption{closure}(object(Application), array()) in Container.php line 776 at Container->build(object(Closure), array()) in Container.php line 659 at Container->make('encrypter', array()) in Application.php line 644 at Application->make('encrypter') in Container.php line 890 at Container->resolveClass(object(ReflectionParameter)) in Container.php line 851 at Container->getDependencies(array(object(ReflectionParameter)), array()) in Container.php line 815 at Container->build('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Container.php line 659 at Container->make('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Application.php line 644 at Application->make('Illuminate\Cookie\Middleware\EncryptCookies') in Kernel.php line 131 at Kernel->terminate(object(Request), object(Response)) in index.php line 57 at require_once('C:\Users\guilherme.nascimento\Desktop\Guilherme\laravel\estoque\public\index.php') in server.php line 21

Oi Guilherme, esse erro costuma rolar por conflito de versão entre o Laravel e seu PHP. Verifica se a versão do seu laravel é compativel com o php instalado na sua máquina.

Abraço