简体   繁体   English

无法解析模块'babel-runtime / core-js / object / define-properties'

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

I'm trying to create a plugin for Vue application. 我正在尝试为Vue应用程序创建一个插件。 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 ./src/authentication.js中的错误找不到模块:错误:无法在D:\\ Dropbox \\ www \\ Vue \\ src @ ./src/authentication中解析模块'babel-runtime / core-js / object / define-properties' .js 7:24-81

What's the problem here? 这有什么问题? I couldn't solve it. 我无法解决它。 Any idea? 任何的想法?

我有同样的错误:安装babel-runtime

npm install babel-runtime --save

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决找不到模块:无法在 Material-UI 中解析“@babel/runtime/core-js/map” - How to solve Module not found: Can't resolve '@babel/runtime/core-js/map' in Material-UI 无法解析模块说明符“babel-runtime/regenerator” - Failed to resolve module specifier "babel-runtime/regenerator" 无法解析babel运行时/再生器 - Unable to resolve babel-runtime/regenerator Babel编译错误:找不到模块core-js / library / fn / get-iterator - Babel compile error: Cannot find module core-js/library/fn/get-iterator 找不到 babel-runtime 库 - cannot find babel-runtime library 找不到模块“ babel-runtime / regenerator”本地导入与从NPM导入 - Cannot find module 'babel-runtime/regenerator' Import locally vs Import from NPM Yeoman:angular-fullstack-generator无法找到模块“ babel-runtime / helpers / interop-require-default” - Yeoman : angular-fullstack-generator cannot find module 'babel-runtime/helpers/interop-require-default' Webpack 无法解析 Windows 上的 core-js 路径 - Webpack cannot resolve core-js paths on Windows Angular 7:无法解析 core-js/features/object/keys - Angular 7: Cant' resolve core-js/features/object/keys 找不到模块:错误:无法解析“core-js/modules/es.error.cause.js” - Module not found: Error: Can't resolve 'core-js/modules/es.error.cause.js'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM