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

Maximum call stack size exceeded. On vscode1.15.1 #390

Closed
Moerj opened this issue Aug 17, 2017 · 25 comments
Closed

Maximum call stack size exceeded. On vscode1.15.1 #390

Moerj opened this issue Aug 17, 2017 · 25 comments
Assignees
Labels

Comments

@Moerj
Copy link

Moerj commented Aug 17, 2017

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

@Moerj Moerj changed the title Connection to server got closed. Server will restart. On vscode1.15.1 Maximum call stack size exceeded. On vscode1.15.1 Aug 17, 2017
@octref
Copy link
Member

octref commented Aug 17, 2017

Can you provide a repro?

@Moerj
Copy link
Author

Moerj commented Aug 17, 2017

image

https://github.com/Moerj/monkey-pc-coupon
@octref
This is my project. You can clone it try to reproduce the bug.

@eric-burel
Copy link

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).

@Moerj
Copy link
Author

Moerj commented Aug 18, 2017

Yes.I lose Emmet after update too.

@Moerj
Copy link
Author

Moerj commented Aug 18, 2017

@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.

image

@eric-burel
Copy link

@Moerj Much thanks, VS Code devs seems to be fond of changing obscure config names so that each new version breaks everything...

@octref
Copy link
Member

octref commented Aug 18, 2017

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?

@Moerj
Copy link
Author

Moerj commented Aug 19, 2017

@octref No. I do npm install all dependencies.
Now I upgrade Vuter@0.9.4 It crash too.

qq20170819-141101 2x

@Moerj
Copy link
Author

Moerj commented Aug 19, 2017

@octref
If you don't npm install dependencies.Has no node_modules. This error will happen? I will.

@Moerj
Copy link
Author

Moerj commented Aug 19, 2017

I try to reinstall node_modules and Vetur. Will still crash. 😰

@Moerj
Copy link
Author

Moerj commented Aug 19, 2017

node@8.3.0
npm@5.3.0
Vetur@0.9.4
vscode@1.15.1

@Moerj
Copy link
Author

Moerj commented Aug 19, 2017

@octref
I know how this bug happened!

When I do npm run build. The vue-cli will build the project and create dist/ files.
image

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 ?

image

@Moerj
Copy link
Author

Moerj commented Aug 19, 2017

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

image

@octref
Copy link
Member

octref commented Aug 19, 2017

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

@Moerj
Copy link
Author

Moerj commented Aug 19, 2017

image

Not work.

@octref
Copy link
Member

octref commented Aug 19, 2017

Remove your emmet.includeLanguages and try completion again.

@Moerj
Copy link
Author

Moerj commented Aug 19, 2017

Yes! already removed.

@octref
Copy link
Member

octref commented Aug 21, 2017

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.

@Moerj
Copy link
Author

Moerj commented Aug 21, 2017

Yeah. Not crashes with jsconfig.json.

@HerringtonDarkholme
Copy link
Member

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.

@Moerj
Copy link
Author

Moerj commented Aug 31, 2017

@HerringtonDarkholme js.config can not completely solve this problem.
I think vetur can add a config to control which folder will be ignore .

@HerringtonDarkholme
Copy link
Member

@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?

@HerringtonDarkholme
Copy link
Member

Sorry, I just note issue closed by other person cannot be reopened by OP. Reopen.

@HerringtonDarkholme
Copy link
Member

I think this should be fixed by microsoft/TypeScript#18246

@octref
Copy link
Member

octref commented Oct 18, 2017

We should upgrade to TS 2.5.3 as microsoft/TypeScript#18246 seems to be included in it.

@octref octref self-assigned this Oct 18, 2017
@octref octref closed this as completed in fc87107 Oct 18, 2017
octref added a commit that referenced this issue Nov 22, 2017
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

4 participants