laravel Mix 清单不存在
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48973311/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The Mix manifest does not exist
提问by sankar
i'm created simple laravel project with this Laravel-Vue SPA starter project templateand im uploaded this project to ubuntu server. all settings corect but i run this project returns this error "The Mix manifest does not exist. (View: /var/www/html/project/resources/views/index.blade.php)".
我使用此Laravel-Vue SPA 入门项目模板创建了简单的 Laravel 项目,并将此项目上传到 ubuntu 服务器。所有设置都正确,但我运行此项目会返回此错误“混合清单不存在。(视图:/var/www/html/project/resources/views/index.blade.php)”。
please anyone help me. i'm new in laravel.
请任何人帮助我。我是 Laravel 的新手。
回答by Samira kalantari
I think it's because of that you separated your laravel files from public folder.
我认为这是因为您将 Laravel 文件与公共文件夹分开。
and public_path() returns wrong path.
和 public_path() 返回错误的路径。
for being sure try dd(public_path()).
确保尝试 dd(public_path())。
if that was wrong ,you have to correct paths in your index.php file and add this code :
如果这是错误的,您必须更正 index.php 文件中的路径并添加以下代码:
$app->bind('path.public', function() {
return __DIR__;
});
i had the same issue and found that the problem is this.
我有同样的问题,发现问题是这个。
maybe it's late to answer this question but it may help others.
也许回答这个问题为时已晚,但它可能会帮助其他人。
回答by Ryderpro
I had the same error. This resolved it for me. npm run production
我有同样的错误。这为我解决了它。npm run production
I tried npm run dev
but it never created the manifest.js
.
我尝试过,npm run dev
但它从未创建过manifest.js
.
回答by Masoud Jahromi
if you dont have node_modules
folder, run npm install
and then run npm run dev
.
如果您没有node_modules
文件夹,请运行npm install
然后运行npm run dev
。
mix()
helper function by default looks for the manifest json file in directory /public/manifest-json.js
. check this file to exist.
mix()
默认情况下,辅助函数会在目录中查找清单 json 文件/public/manifest-json.js
。检查此文件是否存在。
回答by dos4dev
Maybe it will be useful for someone, when I try to visit this URL example.com/nova/login
I find this error
The Mix manifest does not exist.
(View: example/nova/resources/views/auth/layout.blade.php)
也许它对某人有用,当我尝试访问此 URL 时example.com/nova/login
发现此错误
The Mix manifest does not exist.
(View: example/nova/resources/views/auth/layout.blade.php)
In my case executing next command was wrong:
在我的情况下,执行下一个命令是错误的:
npm run production
npm run production
npm run dev
npm run dev
php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
etc.
等等。
I just forgot to install Nova library after I has recovered project, php artisan nova:install
我只是在恢复项目后忘记安装 Nova 库, php artisan nova:install
回答by Jean-Marc Amon
You should create a symlink of storage/app/public
您应该创建一个 storage/app/public 的符号链接
php artisan storage:link