Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot resolve module 'babel-runtime/core-js/object/define-properties'

I'm trying to create a plugin for Vue application. I got an error when I wrote the following code:

export default function(Vue){
    Vue.auth = Authentication;

    Object.defineProperties(Vue.prototype, {
        $auth: {
            get() {return Vue.auth; }
        }
    });
}

and the error is:

ERROR in ./src/authentication.js Module not found: Error: Cannot resolve module 'babel-runtime/core-js/object/define-properties' in D:\Dropbox\www\Vue\src @ ./src/authentication.js 7:24-81

What's the problem here? I couldn't solve it. Any idea?

like image 631
user1012181 Avatar asked Jul 18 '26 04:07

user1012181


1 Answers

I had the same error: install babel-runtime

npm install babel-runtime --save
like image 89
iknowitwasyoufredo Avatar answered Jul 20 '26 19:07

iknowitwasyoufredo