Skip to content

intellisense stop working on node require() statement #23914

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

Closed
mjbvz opened this issue May 5, 2018 · 10 comments
Closed

intellisense stop working on node require() statement #23914

mjbvz opened this issue May 5, 2018 · 10 comments
Labels
Duplicate An existing issue was already created

Comments

@mjbvz
Copy link
Contributor

mjbvz commented May 5, 2018

From @goonode on April 22, 2018 8:36

  • VSCode Version: code-insider-1.23.0-1524201267
  • OS Version: ubuntu 18.04

Steps to Reproduce:

  1. make a new project folder (i used express generator like: express --view=pug --css=sass )
  2. npm install
  3. open the folder in vscode
  4. create a new file (i.e. test.js)
  5. insert a require statement (i.e. const rl = require('readline'); and press enter)

Now cpu go to 100% , intellisense stop working (but also code formatter, linting...)

Closing vscode and re-run solve this issue until a new require statement is used.

Does this issue occur when all extensions are disabled?: Yes

update: it seems also the stable release (i tested on code-stable-code_1.22.2-1523551015_amd64) is affected by this issue.

Copied from original issue: microsoft/vscode#48338

@mjbvz mjbvz self-assigned this May 5, 2018
@mjbvz
Copy link
Contributor Author

mjbvz commented May 5, 2018

@goonode Can you also please try installing and using typescript@next in your workspace by following these instructions. The quick version:

  • npm install typescript@next --no-save
  • In a JavaScript file, run the Select TypeScript version command and select the workspace version of typescript

@mjbvz mjbvz added Needs More Info The issue still hasn't been fully clarified javascript labels May 5, 2018
@mjbvz
Copy link
Contributor Author

mjbvz commented May 5, 2018

You may also want to try creating a jsconfig.json if you do not already have one. Our intellisense sometimes picks up unexpected files otherwise

@mjbvz
Copy link
Contributor Author

mjbvz commented May 5, 2018

From @goonode on April 23, 2018 16:59

@mjbvz I'm just doing it all. Following your instructions in the first test (i had TypeScript version 2.8.1 installed globally) i installed the TypeScript 2.9.0-dev.20180422 locally to the project and i'm using it but the issue persists. Also, for the second test, i created the jsconfig.json, with the same results.

However i notice the issue happens only if i type in the code line, and not if i copy and past the whole code line from another file. The exact moment the issue come is when i type in '' (two single quote
) inside the require(). Also pressing ctrl+space the popup show me the Loading... string forever.
loading_snap

@mjbvz
Copy link
Contributor Author

mjbvz commented May 5, 2018

@goonode Did you also select TS 2.9 as the active version in your workspace. You can check this by running the Select TypeScript Version command from a javascript or typescript file:

screen shot 2018-04-27 at 2 01 56 pm

@mjbvz
Copy link
Contributor Author

mjbvz commented May 5, 2018

From @goonode on April 28, 2018 13:51

@mjbvz Yes, i'm sure

tslatest

and after

tslatest-after

Also i'm using the latest snapshot of code-insder (code-insider-1.23.0-1524818652_amd64), and the ts version 2.8.3 should be the version bundled in.

Also i made a lot of test from my side to try to see if the issue disappear (ie removing .config/Code - Insider folder end restarting from clean configuration, erasing user prefs, using tsconfig.json, and so on) but all without success.

ps: the strange thing is if i copy and past a whole "require" line then the intellisense works on that line, but if i type in the line this does not work.

@mjbvz
Copy link
Contributor Author

mjbvz commented May 5, 2018

Ok, thank you for confirming.

To help us investigate this ,can you please try collecting the typescript server log while using TypeScript@next:

  1. Add "typescript.tsserver.log": "verbose" to your user settings and restart VSCode.
  2. Reproduce the issue
  3. In vscode with a js/ts file open, run the TypeScript: Open TS Server logs command. This should open a log directory with a tsserver.log file in it

Look for errors, stack traces, or other suspicious info near the end of the logs. If you can share the logs I can try looking through them to see what is going on

⚠️Warning: The TypeScript log may include information from your workspace, including file paths and source code. If you have any concerns about posting this publicly on Github, just let me know and we can arrange something else. On our side, we only use these logs to investigate issues like this

@mjbvz
Copy link
Contributor Author

mjbvz commented May 5, 2018

From @goonode on May 1, 2018 16:1

It seems to me there is no error in log, could this issue be not related to typescript ?

Please, find below, both files created by logger:

collected-2.9.tar.gz

@mjbvz mjbvz removed Needs More Info The issue still hasn't been fully clarified javascript labels May 5, 2018
@mjbvz mjbvz removed their assignment May 5, 2018
@mjbvz
Copy link
Contributor Author

mjbvz commented May 5, 2018

Thanks @goonode

The log file comes from 2.9.0-dev.20180422 and I don't see anything obvious in it. Moving over to TS to continue the investigation

@mhegazy mhegazy added the Bug A bug in TypeScript label May 7, 2018
@mhegazy mhegazy added this to the TypeScript 2.9 milestone May 7, 2018
@sheetalkamat
Copy link
Member

This seems like duplicate of #19458 since in the most completions this was followed by sequence like change, geterr, change, completions resulting in delay of seconds between first change (one before geterrr) to completions.

@mhegazy mhegazy added Duplicate An existing issue was already created and removed Bug A bug in TypeScript labels May 7, 2018
@mhegazy mhegazy removed this from the TypeScript 2.9 milestone May 7, 2018
@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants