执行 Composer dumpautoload 命令时出错?

file

我装了winnfsd插件提高网页的访问速度。网上找到的答案如下:

I can confirm this problem, multiple of our developers faced it within the last weeks. Sometimes we could solve it by deleting the autoload_classmap.php file, sometimes by reloading Vagrant, sometimes we couldn't get it working at all. It's not a Laravel problem, it's caused by Vagrant on Windows, specifically by the winnfsd/vagrant-winnfsd plugin. The file_put_contents in src/Composer/Autoload/AutoloadGenerator.php:273 mentioned by @jural does actually work, it returns the number of written bytes like expected. However, the file is still empty after the write operation finishes. This confirms the whole problem being related to the underlying file system. If you configure composer to keep the vendor dir outside of the scope managed by winnfsd ("vendor-dir": "~/composer/"), everything works fine. The winnfsd plugin is known for being quite buggy in general, so I don't think something in composer can be done to solve this problem.

我可以确认这个问题,我们的开发人员在过去几周内遇到了这个问题。有时我们可以通过删除autoload_classmap.php文件来解决它,有时通过重新加载Vagrant,有时我们根本无法使它工作。这不是Laravel问题,它是由Windows上的Vagrant引起的,特别是由winnfsd / vagrant-winnfsd插件引起的。将file_put_contents在src/Composer/Autoload/AutoloadGenerator.php:273通过提到@jural实际上做的工作,它返回写入的字节数像预期。但是,写操作完成后,文件仍为空。这确认了与底层文件系统相关的整个问题。如果配置composer以使供应商目录保持在winnfsd管理的范围之外("vendor-dir": "~/composer/"),一切正常。winnfsd插件一般都是非常有用的,所以我不认为在composer中可以做些什么来解决这个问题。

《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!