I tried to start a vue3 project with vuecli, but when I add vuetify, errors occurred while everything is normal when used vue2. It says
Error: You cannot call "get" on a collection with no paths. Instead,
check the "length" property first to verify at least 1 path exists.
someone has the same problem, need some solution, thank you.
In this link https://vuetifyjs.com/en/getting-started/installation/
Vuetify says:
The current version of Vuetify does not support Vue 3. Support for Vue 3 will come with the release of Vuetify v3. When creating a new project, please ensure you selected Vue 2 from the Vue CLI prompts, or that you are installing to an existing Vue 2 project.
Add the following to main.js. It would solve the problem
new Vue({
router,
store,
vuetify,
render: h => h(App)
}).$mount("#app");
vue3 is giving this error because vue3 is in beta version if you use vue2 you solve your problem. My error is solved by this solution.
Just try with the vue2 version as creating vue instance. I got the same error too and vue2 prevented the error.
If you want to used 'Vue-3 + Vuetify' exclude TypeScript Later you can include when you finished initializing and added 'vue add vuetify'.
Vue create
use vue version 2
after installation run vue add vuetify
error solve
Just choose Vuetify 3 if you are using Vue 3:
When prompted, Choose Vuetify 3 Preview (Vuetify 3)
Related
I am using PhpStorm from some days, for laravel projects.
I have attached a my Index.vue file as screenshot.
I have define a mf method in my app.js
I want to go where $root.mf method is
defined, but there are issue with PhpStorm it can not resolve that
function.
It is possible for PhpStorm can auto detect $root (app.js)
functions inside in any child component??
How to resolve
the issue is tracked at WEB-52054, please follow it for updates
I have a laravel + Vue.js project template downloaded from Creative Tim. Its login and register is not proceeding, giving the catch error whereas in the template demo its working fine. I think so the instructions said to write the VUE_APP_API_BASE_URL in Vue .env file and I didn't wrote it correct. Can anyone pls tell me how can I locate the exact address and what syntax it would be?
Since you are using vue with laravel, you need to prefix MIX_ before the variable. Eg:
MIX_VUE_APP_API_BASE_URL=http://localhost:8000
Here is the reference: https://laravel.com/docs/8.x/mix#environment-variables
I'm trying to implement Realtime CRUD using Google Firebase in my web application,I've managed to retrieve data from the Firebase Database but I saw an error while inspecting elements.
Error:
Uncaught ReferenceError: $ is not defined at users:37
I've tried all possible solutions, these made the error gone but I can't add/update/delete data. basically none of this work
links:
ReferenceError: $ is not defined
Laravel 5 WebPack JQuery - $ is not defined
https://medium.com/#onwuka_gideon/fixing-laravel-jquery-is-not-defined-a316fd918e0a
I've followed every step on here:
*note that I am using Laravel 5.8 rather than 5.6
https://laravelcode.com/post/laravel-56-realtime-crud-system-using-google-firebase#
You can recreate the problem by following it.
include jQuery before firebase.js i.e.
recreated and worked as you mentioned in this LINK
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.9.1/firebase.js"></script>
Example Repo - GITHUB
I already deployed successfully a Laravel and vuejs project to AWS.
I put the project and app.js everything, into ~/laravel then i created a symlink in /var/www/html/laravel/ that point to ~/laravel/public
It is working fine.
I got one problem, whenever i pull a new code including app.js from the branch in github. The code is updated, but when i go to the website, its not updating yet. Several hours later, its back to normal with my new updated code.
Its driving me nut cause i can not test it right away
any suggestion
Thank you
I encountered this behavior when the server was enabled OPcache.
try clear OPcache
https://jenssegers.com/77/clearing-php-s-opcache-with-cachetool
Adding a version number on your app.js every time you compile your assets should fix this. If you are using Laravel mix, simply add on webpack.mix.js file
if (mix.inProduction()) {
mix.version(); // this will add a version number to your app.js
// every time you do `npm run production`
// ex: app.js?id=b35f8fd52c344cb84a52
}
Unexpected token import.
While importing vue-form in VueJS with Laravel 5.4 project.
Getting stuck to use vue-form with Laravel.
using this Repository
https://github.com/fergaldoyle/vue-form
Thanks in Advance.
You're probably using this line import VueForm from 'vue-form';
You'll need webpack + babel (or any other module bundler + ES6 compiler).
If you're not using a module bundler you can use the VueForm global which is created.