相关疑难解决方法(0)

在 Laravel 中安装 vue 3.0

有没有办法将 vue 3.0 安装到 Laravel 8?当我跑

npm install vue@next
Run Code Online (Sandbox Code Playgroud)

它开始安装 Vue 3.0,但出于某种原因,它也开始安装vue-template-compilerv2.6.12。出现以下内容:

    Additional dependencies must be installed. This will only take a moment.

    Running: npm install vue-template-compiler --save-dev --production=false
Run Code Online (Sandbox Code Playgroud)

然后当我跑

npm run dev
Run Code Online (Sandbox Code Playgroud)

出现以下错误:

  • vue@3.0.0 (C:\wamp64\www\vue-sample\node_modules\vue\index.js)
  • vue-template-compiler@2.6.12 (C:\wamp64\www\vue-sample\node_modules\vue-template-compiler\package.json)

这可能会导致事情无法正常工作。确保对两者使用相同的版本。如果您使用的是 vue-loader@>=10.0,只需更新 vue-template-compiler。如果您使用的是 vue-loader@<10.0 或 vueify,重新安装 vue-loader/vueify 应该会将 vue-template-compiler 提升到最新版本。

@ ./resources/js/app.js 19:35-79 @ 多 ./resources/js/app.js ./resources/sass/app.scss

我是 Vue 的新手。我该怎么办?

laravel vue.js vue-component vuejs3 laravel-mix-vue3

15
推荐指数
2
解决办法
2万
查看次数