我使用vue-cli 'vue init webpack-simple my-app‘命令创建了一个新项目。在新的安装副本中,我尝试在默认情况下创建的App.vue组件中导入vue-路由器。但它给了我一个错误:'Uncaught ReferenceError: Vue is not defined‘。如果我在App.vue中再次导入vue,那么这个应用程序运行良好。但是我已经在main.js中导入了vue,那么为什么我需要在App.js中再次导入它呢?有什么办法可以使用从main.js导入的vue吗?这是我的代码:
main.js:
import Vue from 'v
我第一次使用了firebase,并且坚持了这个我无法修复的错误。
基本上我有一个主屏幕和一个登录屏幕。当我运行onBeforeMount来检查用户是否登录时,我会得到以下错误:
Uncaught ReferenceError: onAuthStateChanged is not defined
at eval (webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0
我在用javascript。我使用Vue和传统的html编写了一个反应性的单页应用程序,我想将它移植到vue cli。我有几个js文件。其中有一个函数,我想使用Vue单个文件组件调用它。其中一个js文件名为“controls.js s.js”。一个叫做'v.js‘。v.js文件有一个vue实例。我想在control.js中从v.js文件中运行一个函数。
//error msg
[Vue warn]: Error in v-on handler: "TypeError: formSubmitMessage is not a function"
found in
---
在Laravel5.7/Vuejs2.6应用程序中,我想添加组件,并将其用作颜色选择器并在googling上搜索,我找到了这个示例,但试图在组件中使用它,我得到了错误:
app.js?dt=1556192237:3726 Uncaught ReferenceError: VueColor is not defined
at Module../node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/BS4/Personal.vue?v
我正在一个nuxt应用程序中使用@carbon/vue,并且已经创建了一个插件,我在nuxt.config.js文件中注册了该插件。我现在正在尝试将@ but /type合并到字体中,但它并没有被吸引进来。如何在nuxt中添加碳/类型?
carbon.js
import Vue from "vue";
import "carbon-components/css/carbon-components.css";
import CarbonComponentsVue from "@carbon/vue";
Vue.use(CarbonComponent
我正在尝试将引导程序与我的vue项目集成起来,但是当我打开浏览器时,我的控制台会出现以下错误。
config.js?228e:8 Uncaught TypeError: Cannot read property 'prototype' of undefined
at eval (config.js?228e:8)
at Module../node_modules/bootstrap-vue/esm/utils/config.js (chunk-vendors.js:3262)
at __webpack_require__ (app.js:854)
我有一个奇怪的错误,我不知道是什么导致了这一点,但上次我开发我的项目是很好的。我的chrome浏览器毫无理由地丢失了缓存数据(第二天)。当我运行我的vue3项目时,出现这个错误。控制台日志记录的内容 App.vue?3dfd:11 Uncaught TypeError: Object(...) is not a function
at eval (App.vue?3dfd:11)
at Module../node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_
当我试图在我的Vuetify项目(与Webpack和阿波罗一起)上加载材料图标时,我根本无法让我的应用程序显示出来。
我遵循了武帝为webpack提供的安装说明,但是我收到了一个错误。
Uncaught TypeError: Cannot read property 'install' of undefined
at Function.Vue.use (vue.runtime.esm.js?2b0e:5106)
at eval (vuetify.js?402c:12)
at Module../src/plugins/vuetify.js (app.js:
我正在vue/firebase中开发一个ERP程序。我的问题是:当用户关闭浏览器或运行程序的页面时,我需要注销该用户。 我尝试使用setPersistence,就像这里的文档:https://firebase.google.com/docs/auth/web/auth-state-persistence;但它总是返回未定义属性的错误,如下所示: [Vue warn]: Error in created hook: "TypeError: Cannot read property 'Persistence' of undefined"
(found in Roo
亲爱的堆栈溢出/ Vue.js /汇总社区
对于使用Vue和Rollup的主插件开发人员来说,这可能是一个菜鸟问题。我会非常明确地写这个问题,希望它能帮助像我这样的其他国家在未来。
我有一个简单的插件,可以帮助表单验证。这个插件中的一个组件导入Vue,以便以编程方式创建组件并在挂载上附加到DOM,如下所示:
import Vue from 'vue'
import Notification from './Notification.vue' /* a very simple Vue component */
...
mounted() {
const Not
当我尝试用vue.js在Laravel中运行以下代码时:
<html>
<head>
<title></title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
<!-- Include roboto.css to use the Roboto web font, material.css to include the theme
我已经为工具提示创建了一个自定义目录,我想让它成为一个库,可以导入并在任何其他项目中使用。我已经创建了库,并将其导入到不同的项目中。但是当我运行这个项目时,它返回下面的错误。 Uncaught TypeError: Cannot read property 'install' of undefined
at Function.Vue.use (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:5096)
at eval (webpack-internal:///./node_modules/cache
首先,让我提供一个到git存储库的链接:https://github.com/kbottner/vue3ts 从启用了TypeScript的vue-cli创建的非常简单的Vue3项目。如果您检查提交,您将看到一个简单的更改(添加一个ts文件以包含在vue文件中)导致项目不再起作用。 如果我执行npm run build 我收到以下输出: This relative module was not found:
* ../composables/test.js in ./node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_module
如果我从我的main.js导入模块:
import Vue from 'vue'
import store from './vuex/store'
import VueResource from 'vue-resource'
Vue.use(VueResource);
import Component from './components/component.vue';
在本例中,是否需要在component.js中重新导入component.js?
如果不是,我不明白为什么要在我的component.js中使用vue res
我使用npm安装包括一个客户端的插件,称为vue库,并按照说明加载它作为客户端只插件,如Nuxtjs文档中所述。这个插件可以正常工作,只有一个例外:如果我在导入插件的任何路径上按f5,Nuxt就会抛出一个“无效的或意外的令牌”错误。当您将插件定义为客户端和服务器端时,总是会抛出这个错误。如果直接在浏览器中键入URL,也会发生同样的情况。但是,当您使用应用程序链接导航到页面时,就不会发生这种情况。
请注意,这只是一个外部组件类型插件,而不是一个ES6插件。
vue-gallery.js
import Vue from 'vue'
import VueGallery from
我正在使用parcel-plugin-vue从文件编译最简单的.vue组件。
编译运行,没有错误,但在我的浏览器中显示一个空白页面,没有任何书写。我可以在我的main.js文件中看到,导入.vue组件在运行时未定义。这是为什么呢?
main.js
import Vue from '../node_modules/vue/dist/vue';
import { Welcome } from './app/widgets/welcome/welcome.vue'; //this is undefined at runtime, but doesn'