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

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'messages' of undefined #2717

Closed
4 tasks done
odmishien opened this issue Feb 21, 2021 · 3 comments
Closed
4 tasks done
Labels

Comments

@odmishien
Copy link

odmishien commented Feb 21, 2021

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: MacOS BigSur(11.2.1)
  • Vetur version: 0.32.0
  • VS Code version: 1.54.0-insider

Problem

The VLS got errors as below when .vue file open in VSCode editor.

Vetur initialized
[INFO ] Find node_modules paths in /Users/odmishien/.ghq/github.com/odmishien/my-first-vue-typescript - 118ms
[INFO ] Loaded typescript@3.9.9 from /Users/odmishien/.ghq/github.com/odmishien/my-first-vue-typescript/node_modules/typescript.
[INFO ] Loaded prettier@1.19.1 from /Users/odmishien/.ghq/github.com/odmishien/my-first-vue-typescript/node_modules/prettier.
[INFO ] Loaded bundled @starptech/prettyhtml.
[INFO ] Loaded bundled prettier-eslint.
[INFO ] Loaded bundled prettier-tslint.
[INFO ] Loaded bundled stylus-supremacy.
[INFO ] Loaded bundled @prettier/plugin-pug.
[Error - 13:49:56] (node:52736) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'messages' of undefined
    at doESLintValidation (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.32.0/server/dist/vls.js:677:352)
    at async WI.doValidation (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.32.0/server/dist/vls.js:733:2193)
    at async Promise.all (index 1)
    at async Object.doValidate (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.32.0/server/dist/vls.js:859:3405)
    at async l2.validateTextDocument (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.32.0/server/dist/vls.js:859:16199)
[Error - 13:49:56] (node:52736) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[Error - 13:49:56] (node:52736) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```

How can I solve?

@odmishien
Copy link
Author

@yoyo930021 Thank you for your fix 👍
I have installed latest version(v0.33.0) vetur, but still I got the similar error.

[Error - 12:34:56 AM] (node:32692) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'messages' of undefined
    at doESLintValidation (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.33.0/server/dist/vls.js:699:352)
    at async jL.doValidation (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.33.0/server/dist/vls.js:755:2222)
    at async Promise.all (index 1)
    at async Object.doValidate (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.33.0/server/dist/vls.js:881:3631)
    at async sM.validateTextDocument (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.33.0/server/dist/vls.js:881:17081)
[Error - 12:34:56 AM] (node:32692) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)

@yoyo930021
Copy link
Member

@yoyo930021 Thank you for your fix 👍
I have installed latest version(v0.33.0) vetur, but still I got the similar error.

[Error - 12:34:56 AM] (node:32692) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'messages' of undefined
    at doESLintValidation (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.33.0/server/dist/vls.js:699:352)
    at async jL.doValidation (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.33.0/server/dist/vls.js:755:2222)
    at async Promise.all (index 1)
    at async Object.doValidate (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.33.0/server/dist/vls.js:881:3631)
    at async sM.validateTextDocument (/Users/odmishien/.vscode-insiders/extensions/octref.vetur-0.33.0/server/dist/vls.js:881:17081)
[Error - 12:34:56 AM] (node:32692) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)

This commit isn't released. 😂

yoyo930021 added a commit that referenced this issue Mar 6, 2021
@odmishien
Copy link
Author

This commit isn't released.

Oh 🤣 I had misunderstood. I'm looking forward to release new version!! Thanks.

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

No branches or pull requests

2 participants