简体   繁体   English

类型错误:无法读取未定义的属性“v4”

[英]TypeError: Cannot read property 'v4' of undefined

Am getting this error in vue我在 vue 中收到此错误

vue.esm.js?efeb:628 [Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'v4' 
of undefined"

found in

---> <AddTodo> at src/components/AddTodo.vue
   <App> at src/App.vue
     <Root>

I have already installed uuid so v4 should be working but it is not.我已经安装了 uuid,所以 v4 应该可以工作,但事实并非如此。

I got same error and I solved it.我遇到了同样的错误,我解决了。

import {v4} from 'uuid';

const uuId = v4()

Maybe I'm late to the party也许我迟到了

import * as uuid from 'uuid';

Now you can call anything from uuid.现在你可以从 uuid 调用任何东西。 Such as,如,

uuid.v4();

Hope this helps希望这可以帮助

Am getting this error in vue我在 vue 中遇到这个错误

vue.esm.js?efeb:628 [Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'v4' 
of undefined"

found in

---> <AddTodo> at src/components/AddTodo.vue
   <App> at src/App.vue
     <Root>

I have already installed uuid so v4 should be working but it is not.我已经安装了 uuid,所以 v4 应该可以工作,但事实并非如此。

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

相关问题 未捕获的TypeError:无法读取d3.js v4中未定义的属性“ force” - Uncaught TypeError: Cannot read property 'force' of undefined in d3.js v4 从 mui v4 迁移到 v5 | TypeError:无法读取未定义的属性(读取“keyboardDate”) - Migrating from mui v4 to v5 | TypeError: Cannot read properties of undefined (reading 'keyboardDate') 类型错误:无法读取 v.unsubscribe 处未定义的属性“0” - TypeError: Cannot read property '0' of undefined at v.unsubscribe Tailwind V3 导致类型错误:无法读取未定义的属性“500” - Tailwind V3 causing TypeError: Cannot read property '500' of undefined 渲染错误:“TypeError:无法读取未定义的属性 '0'”v-for 循环 - Error in render: “TypeError: Cannot read property '0' of undefined” v-for loop TypeError:无法读取v-for内部未定义的属性“ 0” - TypeError: Cannot read property '0' of undefined inside v-for v-on 处理程序中的错误:“TypeError:无法读取未定义的属性 'dispatch'” - Error in v-on handler: “TypeError: Cannot read property 'dispatch' of undefined” TypeError:无法读取未定义的属性“0” - TypeError: Cannot read property '0' of undefined TypeError无法读取未定义的属性 - TypeError Cannot read property of undefined TypeError:无法读取未定义的属性… - TypeError: Cannot read property … of undefined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM