ctf0 / Laravel-Media-Manager

A "Vuejs & Laravel" Media Manager With Tons of Features
MIT License
825 stars 178 forks source link

[Question] Problems with Vue on 3.6.7 version. #181

Closed anonunder closed 3 years ago

anonunder commented 3 years ago

Hello,

I did all what is written in readme, but I am facing problems with VUE. Also, this is the first time using vue..

I am using 3.6.7 because my app is on 5.8 so i can't use newer version.

Media manager 3.6.7

In console it gave me two errors: Error in console with BLANK page but when i click on page source i can see that the page is rendered: Page source

I think I am stuck at this:

// app.js
window.Vue = require('vue')

// Laravel < v5.7
require('../vendor/MediaManager/js/manager')
// Laravel > v5.7
// require('../assets/vendor/MediaManager/js/manager')

new Vue({
    el: '#app'
})

Where should i put it ? If I put it in media.blade.php i got Require is not a function. If i include require, there is another error Module name "vue" has not been loaded yet for context: _. Use require([])

If i use require(['vue']) i got like, 20 errors..

What is the problem here? Previous steps are completed succesffully.

ctf0 commented 3 years ago

as the doc says

add this one liner to your main js file

so in most case it will be app.js