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

Connection to server got closed. Server will not be restarted. #51

Closed
hjchin opened this issue Oct 9, 2016 · 6 comments
Closed

Connection to server got closed. Server will not be restarted. #51

hjchin opened this issue Oct 9, 2016 · 6 comments

Comments

@hjchin
Copy link

hjchin commented Oct 9, 2016

Hi there,

I have upgraded my VS CODE to v1.5.3 and soon later I realized that the PHP language server is not working anymore. I saw these messages from the output window:

[Info - 11:53:23 AM] Connection to server got closed. Server will restart.
[Info - 11:53:29 AM] Connection to server got closed. Server will restart.
[Info - 11:53:35 AM] Connection to server got closed. Server will restart.
[Info - 11:53:41 AM] Connection to server got closed. Server will restart.
[Error - 11:53:47 AM] Connection to server got closed. Server will not be restarted.

I'm no longer able to search for symbol using '@' command in the Command Palette.

I then tried the tests command, and I got

vendor/bin/phpunit --bootstrap vendor/autoload.php tests
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.

................ 16 / 16 (100%)

Time: 1.57 seconds, Memory: 14.00MB

OK (16 tests, 28 assertions)

Strange enough, could anyone helps? Thanks.

@felixfbecker
Copy link
Owner

The stack trace should be logged under Help > Toggle developer tools

@hjchin
Copy link
Author

hjchin commented Oct 9, 2016

Thanks for the reply!

Here is the stack trace. I renamed the application name.


> /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:118 [Extension Host] PHP Fatal error:  Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(c:\Users\HJ Chin\xxx\xx\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-computed-properties\node_modules\babel-helper-define-map\node_modules\babel-helper-function-name\node_modules\babel-traverse\lib\path\inference,c:\Users\HJ Chin\xxx\xx\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-computed-properties\node_modules\babel-helper-define-map\node_modules\babel-helper-function-name\node_modules\babel-traverse\lib\path\inference): The system cannot find the path specified. (code: 3) in C:\Users\HJ Chin\.vscode\extensions\felixfbecker.php-intellisense-0.0.9\vendor\felixfbecker\language-server\src\utils.php:18
> Stack trace:
> #0 [internal function]: RecursiveDirectoryIterator->__construct('c:\\Users\\HJ Chi...', 0)
> #1 [internal function]: RecursiveDirectoryIterator->getChildren()
> #2 C:\Users\HJ Chin\.vscode\extensions\felixfbecker.php-intellisense-0.0.9\ven in C:\Users\HJ Chin\.vscode\extensions\felixfbecker.php-intellisense-0.0.9\vendor\felixfbecker\language-server\src\utils.php on line 18
> (anonymous function) @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:118
> /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:118 

@felixfbecker
Copy link
Owner

That is a very long path, looks to me like it might be reaching maximum path length. Seems like you are NPM2, try to upgrade to NPM3 and reinstall or delete the node_modules folder and see if the error still happens

@hjchin
Copy link
Author

hjchin commented Oct 9, 2016

Thanks for the prompt reply. Let me try it out and get back to you soon!

@hjchin
Copy link
Author

hjchin commented Oct 10, 2016

it is due to the path length of module babel-preset-es2015. I removed the module and it's working now! Thanks!

@felixfbecker
Copy link
Owner

Too long file paths were a known problem with NPM 2 in general. In NPM 3 all dependencies are flat.

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

2 participants