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

Server still crash on 0.6.1 - throw new Error("start < 0"); #128

Closed
askz opened this issue Apr 20, 2017 · 10 comments
Closed

Server still crash on 0.6.1 - throw new Error("start < 0"); #128

askz opened this issue Apr 20, 2017 · 10 comments

Comments

@askz
Copy link

askz commented Apr 20, 2017

Still having issue with server, last VSCode version on ArchLinux updated with node v7.8.0

/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:10566
            throw new Error("start < 0");
            ^

Error: start < 0
    at createTextSpan (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:10566:19)
    at Object.createTextSpanFromBounds (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:10575:16)
    at getErrorSpanForNode (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:7075:19)
    at createDiagnosticForNodeInSourceFile (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:6999:20)
    at Object.createDiagnosticForNode (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:6995:16)
    at /home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:21582:58
    at Object.forEach (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:1423:30)
    at declareSymbol (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:21581:28)
    at declareModuleMember (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:21600:28)
    at declareSourceFileMember (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:22646:19)
    at declareSymbolAndAddToSymbolTableWorker (/home/xxxxxx/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:22596:28)
[Error - 7:43:37 PM] Connection to server got closed. Server will not be restarted.

@octref
Copy link
Member

octref commented Apr 20, 2017

Can you help me finding a repro? Try it on some public vue projects like https://github.com/vuejs/vue-hackernews-2.0 or https://github.com/vuejs-templates/webpack and see if the server crashes? If not, can you try to put some code from your codebase to a template project and manage to crash vetur's Language Server?

This is what @The-Smallest did and was extremely helpful for me to fix the previous crash:

image

@rafaberaldo
Copy link

rafaberaldo commented Apr 20, 2017

It's crashing for me too on startup, let me see if I can reproduce.

@stoked74
Copy link

It's happening to me as well. I just created a stock asp.net core web api project using the yeoman generator and as soon as I opened the project it it started crashing.

npm install -g yo bower
npm install -g [email protected]
yo aspnet

@jing2si
Copy link

jing2si commented Apr 21, 2017

@octref
I find the crashed reason.
If in a vue file script tag write import Vue, that will cause crash.
writeimport vue do not cause crash.
reason

@octref
Copy link
Member

octref commented Apr 21, 2017

@jing2si

Thanks! I'm able to repro it. Will look into a fix soon.

@sandersn
Copy link
Contributor

It's because vetur 0.6 inserts a hidden import Vue from 'vue' for you. I forgot that people might still want to write it explicitly. In that case, it should not insert a hidden one.

@octref
Copy link
Member

octref commented Apr 25, 2017

@jing2si Thanks for the repro.

For people having this problem, 0.6.2 is published with @sandersn's fix. Please give it a try.
@jing2si's case is resolved by 0.6.2 at least.

@ronjouch
Copy link

0.6.2 fixed it for me too, thanks! 👍

@cynecx
Copy link

cynecx commented Apr 25, 2017

It seems to be fixed but I am experiencing abnormal performance issues. For example, if auto-complete is triggered it shows a loading sign which stays for some seconds until the auto-complete dialog shows up. Is anyone else experiencing this?

It used to be really fast (Instant completion-info) for my project which hasn't changed in a few weeks.

Also is it normal that the vetur server process uses like 1-2 GiB ram?

@octref
Copy link
Member

octref commented Apr 25, 2017

@cynecx That's not normal. I'm looking into that in #131.

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

8 participants