Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行yarn serve报错Cannot read property '0' of undefined #29

Closed
kenjiding opened this issue May 3, 2020 · 2 comments
Closed

运行yarn serve报错Cannot read property '0' of undefined #29

kenjiding opened this issue May 3, 2020 · 2 comments

Comments

@kenjiding
Copy link

kenjiding commented May 3, 2020

运行yarn serve报错

使用vue create vue3搭建了项目,然后使用vue add vue-next,再运行yarn serve打开网页就报以下错误

vue-cli版本:4.3.1

image

@xinpingwang
Copy link

xinpingwang commented May 3, 2020

Assume you have install Vue devtools extensions to your browser, and use vuex in your project

Solution

  1. Make following changes to your package.json.
    image

  2. (or) disable Vue devtools

Problem

I encountered same problem yesterday, This problem is caused by vuejs/core#1107 and introduce in https://github.com/vuejs/vue-next/releases/tag/v3.0.0-beta.7.

when the project start, vuex will emit an vuex:init event to vue devtools, and then vue devtools will try to make a clone of the current vuex state, causes getCleanClone to be invoked. the getCleanClone function, will read store.state.__proto__.

this issue is fixed by vuejs/core@6be2b73, so you can lock vue version to v3.0.0-beta.6, and wait v3.0.0-beta.8 to be released.

@kenjiding
Copy link
Author

vuejs/core@6be2b73

thanks, Problem has been solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants