未找到带有App Engine标准类'Facade \ Ignition \ IgnitionServiceProvider'的Laravel
第二天让我发疯.我是Laravel的新手,并试图让Laravel 6在Google App Engine Standard上工作. 尝试过:本教程和其他教程,但是仍然无法加载Laravel索引页面
This is driving me crazy second day. I'm new to Laravel and trying to get Laravel 6 work on Google App Engine Standard. Tried: This tutorial and other ones, but it still fails to load Laravel index page
我做了什么:
-
创建了新的Laravel项目
Created new Laravel project
使用php artisan serve
使用php artisan key:generate --show
使用以下方法创建的app.yaml文件:
Created app.yaml file with:
runtime: php72
env_variables:
APP_KEY: iktbUa2quYPV2av3zDx0XAuEVjwzVQY/oMfyI2PQNKk=
APP_STORAGE: /tmp
VIEW_COMPILED_PATH: /tmp
SESSION_DRIVER: cookie
-
通过添加
$app->useStoragePath(env('APP_STORAGE', base_path() . '/storage'));
Ran composer remove --dev beyondcode/laravel-dump-server
也跑了:
php artisan cache:clear
,
php artisan route:cache
,
php artisan config:clear
,
php artisan view:clear
(根据其他教程的建议)
Also ran:
php artisan cache:clear
,
php artisan route:cache
,
php artisan config:clear
,
php artisan view:clear
(as other tutorials suggested)
和gcloud app deploy
我收到错误消息:"找不到类'Facade \ Ignition \ IgnitionServiceProvider'"
And I get error: "Class 'Facade\Ignition\IgnitionServiceProvider' not found"
我也遇到了其他错误,其中大多数给了我错误 500 和
I have experienced other errors as well, most of them gave me Error 500 and
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /tmp/google-config/nginx.conf:3
在Stackdriver Logger中
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /tmp/google-config/nginx.conf:3
in Stackdriver Logger
我也不知道App Engine在构建时正在执行composer.json(请参见
Also I was not aware that App Engine was executing composer.json on build (see Specifying Dependencies). And it seems the issue was that it cached that.
所有问题都可以通过替换步骤7中的命令来解决.:
gcloud app deploy
与 gcloud beta app deploy --no-cache
gcloud app deploy
with gcloud beta app deploy --no-cache
好像我可以按照 tutorial 从一开始我就不会有任何问题.
It seems that if I would have done all steps as in tutorial from the start I would not have any issues.