无法在位置写文件:to://app.js(Laravel 9 Composer在登台站点上更新)
因此,我只是在一个正在处理的应用程序的登台网站上运行了一个作曲家更新程序,并且在作曲家生成了它的软件包清单之后,我会遇到此错误:
> @php artisan vendor:publish --tag=laravel-assets --ansi --force
League\Flysystem\UnableToWriteFile
Unable to write file at location: to://app.js.
at vendor/league/flysystem/src/UnableToWriteFile.php:24
20▕ private $reason;
21▕
22▕ public static function atLocation(string $location, string $reason = '', Throwable $previous = null): UnableToWriteFile
23▕ {
➜ 24▕ $e = new static(rtrim("Unable to write file at location: {$location}. {$reason}"), 0, $previous);
25▕ $e->location = $location;
26▕ $e->reason = $reason;
27▕
28▕ return $e;
+24 vendor frames
25 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Script @php artisan vendor:publish --tag=laravel-assets --ansi --force handling the post-update-cmd event returned with error code 1
我尝试使用php php工匠存储来重建符号链接:link 成功,但仍然存在相同的错误。我还运行了
npm运行dev
,然后完成并创建了app.js(在public/js/以及我的其他JS文件中为此项目)。我也只有php手工艺品供应商:发布-tag = laravel-assets -ansi -force
,正如我所期望的那样,我会遇到相同的错误。
我认为这需要解决,尽管一切似乎是正确的,但一切都可以正常工作吗?那么,我需要做什么才能删除此错误?
谢谢
So I just ran a composer updater on a staging site for an app I'm working on and i get this error after composer has generated it's package manifest:
> @php artisan vendor:publish --tag=laravel-assets --ansi --force
League\Flysystem\UnableToWriteFile
Unable to write file at location: to://app.js.
at vendor/league/flysystem/src/UnableToWriteFile.php:24
20▕ private $reason;
21▕
22▕ public static function atLocation(string $location, string $reason = '', Throwable $previous = null): UnableToWriteFile
23▕ {
➜ 24▕ $e = new static(rtrim("Unable to write file at location: {$location}. {$reason}"), 0, $previous);
25▕ $e->location = $location;
26▕ $e->reason = $reason;
27▕
28▕ return $e;
+24 vendor frames
25 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Script @php artisan vendor:publish --tag=laravel-assets --ansi --force handling the post-update-cmd event returned with error code 1
I tried to rebuild the symbolic links with php artisan storage:link
which was successful but still have the same error. I have also ran npm run dev
and this finished too and created app.js (in public/js/ along with my other js files for this project). I have also just ran php artisan vendor:publish --tag=laravel-assets --ansi --force
and as I expected I get the same error.
I assume this needs to be resolved for everything to work right despite it appearing to be correct? So what would I need to do to remove this error?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在帆/码头机上也有类似的问题,
夹的所有权。
我已经通过更改文件
I had a similar issue with Sail/Docker,
I've fixed it by changing the ownership of the folder ./vendor and ./public/vendor to my user
In my WSL connexion and my project folder, I've ran: