Today Vetur was good before I updated vscode.
But when I upgreade vscode from 1.15 to 1.15.1. Vetur has a problem.
vetur initialized
/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:15973
function forEachChild(node, cbNode, cbNodeArray) {
^
RangeError: Maximum call stack size exceeded
at Object.forEachChild (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:15973:26)
at bindEachChild (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:23091:16)
at bindBinaryExpressionFlow (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:23748:17)
at bindChildrenWorker (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:23162:21)
at bindChildren (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:23066:17)
at bind (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:24319:21)
at visitNode (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:15944:20)
at Object.forEachChild (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:16114:24)
at bindEachChild (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:23091:16)
at bindBinaryExpressionFlow (/Users/apple/.vscode/extensions/octref.vetur-0.9.3/client/node_modules/typescript/lib/typescript.js:23748:17)
[Info - 7:48:31 PM] Connection to server got closed. Server will restart.
vscode @1.15.1
vetur @0.9.3
Can you provide a repro?

https://github.com/Moerj/monkey-pc-coupon
@octref
This is my project. You can clone it try to reproduce the bug.
Hi,
I did not have this problem, however I lost Emmet after update, the "Expand abbrevation command" won't work anymore, even when manually triggering using the menu instead of pressing tab (which is understandable since there seems to have been breaking changes about Emmet in this version).
Yes.I lose Emmet after update too.
@eric-burel
see https://code.visualstudio.com/blogs/2017/08/07/emmet-2.0#_other-changes
Use emmet.includeLanguages instead of emmet.syntaxProfiles setting.
Now emmet is work.

@Moerj Much thanks, VS Code devs seems to be fond of changing obscure config names so that each new version breaks everything...
Remove all settings in includeLanguages and upgrade to 0.9.4 for new Emmet support.
@Moerj Your project doesn't crash for me though. Are you still using symlinks?
@octref No. I do npm install all dependencies.
Now I upgrade [email protected] It crash too.

@octref
If you don't npm install dependencies.Has no node_modules. This error will happen? I will.
I try to reinstall node_modules and Vetur. Will still crash. 馃槹
@octref
I know how this bug happened!
When I do npm run build. The vue-cli will build the project and create dist/ files.

In the dist folder. vendor.**.js . There is such a code: forEachChild.
So. Need a jsconfig.json to exclude dist folder ?
But I don't want to create it. Can I config Vetur by settings.json in Vscode ?

I mean. If I create a jsconfig.json like this https://vuejs.github.io/vetur/setup.html
Vetur Language server will not work.

If you just exclude dist/**/*, does it work?

Not work.
Remove your emmet.includeLanguages and try completion again.
Yes! already removed.
So with jsconfig.json, you are not getting crashes?
With jsconfig, I get this.$ completions in src/components but not src/views. I'll take a look at this later.
Yeah. Not crashes with jsconfig.json.
Hi @Moerj , I think this issue has been solved. So let's close this issue first.
Feel free to reopen it if you still have problems.
@HerringtonDarkholme js.config can not completely solve this problem.
I think vetur can add a config to control which folder will be ignore .
@Moerj Would you mind give me more explanation?
Note, You need to configure jsconfig.json's include field to include all files you want to compile.
exclude only affects files in included options. That is, using exclude alone won't work.
Could you try this out?
Sorry, I just note issue closed by other person cannot be reopened by OP. Reopen.
I think this should be fixed by https://github.com/Microsoft/TypeScript/pull/18246
We should upgrade to TS 2.5.3 as https://github.com/Microsoft/TypeScript/pull/18246 seems to be included in it.
Most helpful comment
@eric-burel
see https://code.visualstudio.com/blogs/2017/08/07/emmet-2.0#_other-changes
Use emmet.includeLanguages instead of emmet.syntaxProfiles setting.
Now emmet is work.