我已经安装了最新版本的Laravel与Sail撰写这篇文章。我用惯性作为前端。我遵循指南并安装了必要的依赖项。运行npm run dev和npm run build很好。但是,当我运行npm run ssr时,我遇到了以下错误:
Cannot find module '/var/www/html/node_modules/laravel-vite-plugin/inertia-helpers.js' imported from /var/www/html/bootstrap/ssr/ssr.mjs
package.json
{
"private": tr
我运行过npm运行监视并收到了消息
This dependency was not found:
* in ./resources/assets/js/app.js
To install it, you can run: npm install --save
所以我运行npm安装-保存,但仍然得到相同的信息。
据我所知,我需要npm运行或npm运行手表加载Vue文件在Laravel。
例如,在‘resources/assets/js/components/ example e.vue’文件中,我对其进行了编辑,但是当我加载‘resources/view/pope.blde.php’文件
mixin/error.js
export default {
data(){
return{
text:"This is a text from the mixin",
}
},
};
--我在我的app.js中以的形式全局导入了混音
从“./mixins/ error”导入错误
Vue.mixin(错误);
在我的login.vue组件中,如果我试图在一个方法中显示混合数据,它可以很好地工作……像这样的
showMixinData(){
alert(this.text);
}
,但是当我试图在