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
执行 vue ui 命令时出现错误: ERROR TypeError: Cannot read properties of undefined (reading 'on') #7221
Comments
it's a new issue, not happened until yesterday.
btw, only affects ui command, |
Yes, this caused all the 5.x versions I installed to be unusable |
I am experiencing this issue after updating Vue-CLI as well. Downgrading back to an older version does not help. |
I can fix this by going back to 4.x, and maybe you can try it too. |
That does work for me as a workaround for now, though isn't an ideal solution. Especially since the UI feature was working fine on 5.x earlier today. From digging into vue-cli source a bit, they updated the @vue/cli-ui package's Apollo server today which seems to be causing the issue: When I downgrade @vue/cli, the updated @vue/cli-ui package (which requires the updated apollo-server-express) doesn't downgrade with it unless I go all the way back to 4.x. From
|
I found that the rollback version did not work because the 5.x dependencies were all 5.x.x, so the rollback cli was still using the 5.0.7 version of the UI. i changed the UI related dependencies to 5.0.6 in the 5.0.6 version of package.json, then reinstalled it and found that it worked. This method is not very safe, a good way would be to use resolution, but I don't know how to install globally using resolution |
I have successfully solved this problem according to your suggestion. Thank you very much! |
@PsssssssHao @horans @etekweb 第四步:根据 package.json 文件重新安装依赖即可解决 If there are current problems, my current solutions are as follows: |
same problem happened today,, Roll back @vue/cli to 4.x will fix it |
Version
5.0.4
Environment info
Steps to reproduce
执行 vue ui 命令时出现以下错误语句:
Persisted queries are enabled and are using an unbounded cache. Your server is vulnerable to denial of service attacks via memory exhaustion. Set
cache: "bounded"
orpersistedQueries: false
in your ApolloServer constructor, or see https://go.apollo.dev/s/cache-backends for other alternatives.ERROR TypeError: Cannot read properties of undefined (reading 'on')
TypeError: Cannot read properties of undefined (reading 'on')
at ui (C:\Users\Administrator\AppData\Roaming\npm\node_modules@vue\cli\lib\ui.js:90:14)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
What is expected?
出现的错误给出了解决·方案,但是我不知道如何寻找ApolloServer构造函数设置' cache: "bounded"或者' persistedQueries: false '
What is actually happening?
出现错误语句,浏览器没有打开可视面板
The text was updated successfully, but these errors were encountered: