我在这里和网上的多个问题中都看到过这个错误"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
--但是每个解决方案都只是要求升级composer
来修复它。我更新了composer,更新了,并在全球范围内更新了所有软件包,但我仍然看到了错误:
➜ laravel -V
Laravel Installer 3.0.1
➜ composer self-update
You are already using composer version 1.10.1 (stable channel).
➜ php -v
PHP 7.3.16 (cli) (built: Mar 19 2020 11:19:09) ( NTS )
➜ composer global update
Changed current directory to ~/.composer
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
➜ laravel new myprojectname
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
[ErrorException]
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
还有什么其他的想法要检查吗?
这是在Mac OSX Catalina上
发布于 2020-03-30 15:26:08
最后,我的.zshrc
配置中出现了一些相互冲突的别名问题。
Composer
被别名为usr/local/bin/composer.phar
,因此我将该文件移至~/.composer/vendor/bin/composer
,删除了.zshrc
文件中laravel
、lumen
和composer
的所有别名,并删除并重新添加了基本的export PATH="$PATH:$HOME/.composer/vendor/bin"
路径。
这很有帮助:https://laracasts.com/discuss/channels/general-discussion/sh-composer-command-not-found
https://stackoverflow.com/questions/60172558
复制相似问题