Solucionado (ver solução)
Solucionado
(ver solução)
7
respostas

INFO No publishable resources for tag [laravel-assets].

Ao instalar o projeto, conforme o comando

composer create-project laravel/laravel controle-series

ele instala varias dependências, mas da 2 erros ao final.

(.......)

 - Installing phpunit/phpunit (11.1.3): Extracting archive
59 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.

  laravel/sail ................................................................................................................ DONE
  laravel/tinker .............................................................................................................. DONE
  nesbot/carbon ............................................................................................................... DONE
  nunomaduro/collision ........................................................................................................ DONE
  nunomaduro/termwind ......................................................................................................... DONE

79 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan vendor:publish --tag=laravel-assets --ansi --force

   INFO  No publishable resources for tag [laravel-assets].

Com o erro (segue no proximo comentario)

7 respostas
PHP Symfony\Component\Console\Exception\RuntimeException:  The "--tag" option does not exist. in D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\ArgvInput.php on line 220
PHP Stack trace:
PHP   1. {main}() D:\Aulas\Alura\controle-series\artisan:0
PHP   2. Illuminate\Foundation\Application->handleCommand($input = class Symfony\Component\Console\Input\ArgvInput { protected Symfony\Component\Console\Input\InputDefinition $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected array $options = []; protected array $arguments = ['command' => 'vendor:publish']; protected bool $interactive = TRUE; private array $tokens = [0 => 'vendor:publish', 1 => '--tag=laravel-assets', 2 => '--ansi', 3 => '--force']; private array $parsed = [0 => '--ansi', 1 => '--force'] }) D:\Aulas\Alura\controle-series\artisan:13
PHP   3. Illuminate\Foundation\Console\Kernel->handle($input = class Symfony\Component\Console\Input\ArgvInput { protected Symfony\Component\Console\Input\InputDefinition $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected array $options = []; protected array $arguments = ['command' => 'vendor:publish']; protected bool $interactive = TRUE; private array $tokens = [0 => 'vendor:publish', 1 => '--tag=laravel-assets', 2 => '--ansi', 3 => '--force']; private array $parsed = [0 => '--ansi', 1 => '--force'] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) D:\Aulas\Alura\controle-series\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:1191
PHP   4. Symfony\Component\Console\Application->run($input = class Symfony\Component\Console\Input\ArgvInput { protected Symfony\Component\Console\Input\InputDefinition $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected array $options = []; protected array $arguments = ['command' => 'vendor:publish']; protected bool $interactive = TRUE; private array $tokens = [0 => 'vendor:publish', 1 => '--tag=laravel-assets', 2 => '--ansi', 3 => '--force']; private array $parsed = [0 => '--ansi', 1 => '--force'] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) D:\Aulas\Alura\controle-series\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:196
PHP   5. Symfony\Component\Console\Application->doRun($input = class Symfony\Component\Console\Input\ArgvInput { protected Symfony\Component\Console\Input\InputDefinition $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected array $options = []; protected array $arguments = ['command' => 'vendor:publish']; protected bool $interactive = TRUE; private array $tokens = [0 => 'vendor:publish', 1 => '--tag=laravel-assets', 2 => '--ansi', 3 => '--force']; private array $parsed = [0 => '--ansi', 1 => '--force'] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) D:\Aulas\Alura\controle-series\vendor\symfony\console\Application.php:167
PHP   6. Symfony\Component\Console\Input\Input->bind($definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = ['command' => class Symfony\Component\Console\Input\InputArgument { ... }]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = ['help' => class Symfony\Component\Console\Input\InputOption { ... }, 'quiet' => class Symfony\Component\Console\Input\InputOption { ... }, 'verbose' => class Symfony\Component\Console\Input\InputOption { ... }, 'version' => class Symfony\Component\Console\Input\InputOption { ... }, 'ansi' => class Symfony\Component\Console\Input\InputOption { ... }, 'no-interaction' => class Symfony\Component\Console\Input\InputOption { ... }, 'env' => class Symfony\Component\Console\Input\InputOption { ... }]; private array $negations = ['no-ansi' => 'ansi']; private array $shortcuts = ['h' => 'help', 'q' => 'quiet', 'v' => 'verbose', 'vv' => 'verbose', 'vvv' => 'verbose', 'V' => 'version', 'n' => 'no-interaction'] }) D:\Aulas\Alura\controle-series\vendor\symfony\console\Application.php:229
PHP   7. Symfony\Component\Console\Input\ArgvInput->parse() D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\Input.php:53
PHP   8. Symfony\Component\Console\Input\ArgvInput->parseToken($token = '--tag=laravel-assets', $parseOptions = TRUE) D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\ArgvInput.php:71
PHP   9. Symfony\Component\Console\Input\ArgvInput->parseLongOption($token = '--tag=laravel-assets') D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\ArgvInput.php:82
PHP  10. Symfony\Component\Console\Input\ArgvInput->addLongOption($name = 'tag', $value = 'laravel-assets') D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\ArgvInput.php:147
No security vulnerability advisories found.
> @php artisan key:generate --ansi

   INFO  Application key set successfully.

> @php -r "file_exists('database/database.sqlite') || touch('database/database.sqlite');"
> @php artisan migrate --graceful --ansi

   INFO  Preparing database.

  Creating migration table PHP Symfony\Component\Console\Exception\RuntimeException:  The "--graceful" option does not exist. in D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\ArgvInput.php on line 220
PHP Stack trace:
PHP   1. {main}() D:\Aulas\Alura\controle-series\artisan:0
PHP   2. Illuminate\Foundation\Application->handleCommand($input = class Symfony\Component\Console\Input\ArgvInput { protected Symfony\Component\Console\Input\InputDefinition $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected array $options = []; protected array $arguments = ['command' => 'migrate']; protected bool $interactive = TRUE; private array $tokens = [0 => 'migrate', 1 => '--graceful', 2 => '--ansi']; private array $parsed = [0 => '--ansi'] }) D:\Aulas\Alura\controle-series\artisan:13
PHP   3. Illuminate\Foundation\Console\Kernel->handle($input = class Symfony\Component\Console\Input\ArgvInput { protected Symfony\Component\Console\Input\InputDefinition $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected array $options = []; protected array $arguments = ['command' => 'migrate']; protected bool $interactive = TRUE; private array $tokens = [0 => 'migrate', 1 => '--graceful', 2 => '--ansi']; private array $parsed = [0 => '--ansi'] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) D:\Aulas\Alura\controle-series\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:1191
PHP   4. Symfony\Component\Console\Application->run($input = class Symfony\Component\Console\Input\ArgvInput { protected Symfony\Component\Console\Input\InputDefinition $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected array $options = []; protected array $arguments = ['command' => 'migrate']; protected bool $interactive = TRUE; private array $tokens = [0 => 'migrate', 1 => '--graceful', 2 => '--ansi']; private array $parsed = [0 => '--ansi'] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class 
Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) D:\Aulas\Alura\controle-series\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:196
PHP   5. Symfony\Component\Console\Application->doRun($input = class Symfony\Component\Console\Input\ArgvInput { protected Symfony\Component\Console\Input\InputDefinition $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected array $options = []; protected array $arguments = ['command' => 'migrate']; protected bool $interactive = TRUE; private array $tokens = [0 => 'migrate', 1 => '--graceful', 2 => '--ansi']; private array $parsed = [0 => '--ansi'] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) D:\Aulas\Alura\controle-series\vendor\symfony\console\Application.php:167
PHP   6. Symfony\Component\Console\Input\Input->bind($definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = ['command' => class Symfony\Component\Console\Input\InputArgument { ... }]; private int $requiredCount = 1; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = ['help' => class Symfony\Component\Console\Input\InputOption { ... }, 'quiet' => class Symfony\Component\Console\Input\InputOption { ... }, 'verbose' => class Symfony\Component\Console\Input\InputOption { ... }, 'version' => class Symfony\Component\Console\Input\InputOption { ... }, 'ansi' => class Symfony\Component\Console\Input\InputOption { ... }, 'no-interaction' => class Symfony\Component\Console\Input\InputOption { ... }, 'env' => class Symfony\Component\Console\Input\InputOption { ... }]; private array $negations = ['no-ansi' => 'ansi']; private array $shortcuts = ['h' => 'help', 'q' => 'quiet', 'v' => 'verbose', 'vv' => 'verbose', 'vvv' => 'verbose', 'V' => 'version', 'n' => 'no-interaction'] }) D:\Aulas\Alura\controle-series\vendor\symfony\console\Application.php:229
PHP   7. Symfony\Component\Console\Input\ArgvInput->parse() D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\Input.php:53
PHP   8. Symfony\Component\Console\Input\ArgvInput->parseToken($token = '--graceful', $parseOptions = TRUE) D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\ArgvInput.php:71
PHP   9. Symfony\Component\Console\Input\ArgvInput->parseLongOption($token = '--graceful') D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\ArgvInput.php:82
PHP  10. Symfony\Component\Console\Input\ArgvInput->addLongOption($name = 'graceful', $value = NULL) D:\Aulas\Alura\controle-series\vendor\symfony\console\Input\ArgvInput.php:149
........................................................................................... 152.59ms DONE


   INFO  Running migrations.

  0001_01_01_000000_create_users_table ............................................................................... 498.37ms DONE
  0001_01_01_000001_create_cache_table ............................................................................... 169.35ms DONE
  0001_01_01_000002_create_jobs_table ................................................................................ 414.31ms DONE
solução!

23horas depois eu resolvi. Com muito google e tomando surra. Fiz tudo pelo Docker da "maquina virtual" WSL porque confiei mais que o docker iria instalar melhor.

  • Promeiro instalei a WSL e atualizei para o Ubuntu mais novo.
  • Setei o Docker (nas configuracoes do app dentro do windows) para usar a WSL 2.0
  • Mudei as configuracoes de acesso do meu drive D (onde ficam as pastas de programacao) para 777 (chmod -d 777 [diretorio] ) e esperei umas 3h para tudo ser alterado (usando o WSL). Fica em \wsl.localhost\Ubuntu-22.04\mnt
  • Instalei o PHP na WSL
  • fiz o apt-update
  • fiz o apt-upgrade Dai eu achei uma sequencia de comandos para serem executados em algum post do stackoverflow e confiei e fui....

primeiro https://phoenixnap.com/kb/install-docker-compose-on-ubuntu-20-04

em seguinda: sudo apt install software-properties-common sudo add-apt-reposository ppa:ondrej/php sudo add-apt-repository ppa:ondrej/php bash ./vendor/laravel/sail/bin/sail up curl -s http://127.0.0.1:8080/controle-series | bash

depois acessei o link e segui os passos https://www.ionos.com/digitalguide/server/configuration/install-docker-compose-on-windows/

em seguida https://phoenixnap.com/kb/install-docker-compose-on-ubuntu-20-04

Por fim,

  • instalei o laravel no diretorio e tudo deu certo com o comando do composer create-project laravel/laravel com o nome do projeto.
  • voltei no windows e pelo powerShell rodei o servidor do PHP php artisan serve

Detalhe, nao achei esta solução completa deste jeito em nenhum lugar. Muita gente tem este problema e nem em site grindo achei a solução. Isso ai dependeu de MUITA tentaiva e erro.

NOTA: Possivelmente alguns comandos ai sejam dispensáveis ja que eu nao sei exatamente o que cada um faz (tem umas coisas q escapam meu conhecimento), mas no final, funcionou.