question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intellisense gets stuck indefinitely in loading

See original GitHub issue

Bug Report

🔎 Search Terms

TS Server stuck in loading

🕗 Version & Regression Information

VSCode version: 1.60.2 Typescript version: 4.4.3 Also tried the Typescript’s nightly version: 4.5.0-dev.20210922 OS: macOS Big Sur (Version 11.5.2)

Few things I have tried:

  • Removed VSCode completely and installed it again
  • VScode insiders
  • Tried it on a different OS (Linux) and get the same issue

TS Server logs (Verbose mode)

Info 185  [19:45:08.590] DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/responselike 1 undefined Project: /Users/anasyusef/[REDACTED]/tsconfig.json WatchType: Failed Lookup Locations
Info 186  [19:45:08.590] Elapsed:: 0.22440296411514282ms DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/responselike 1 undefined Project: /Users/anasyusef/[REDACTED]/tsconfig.json WatchType: Failed Lookup Locations
Info 187  [19:45:08.593] DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/serve-static 1 undefined Project: /Users/anasyusef/[REDACTED]/tsconfig.json WatchType: Failed Lookup Locations
Info 188  [19:45:08.594] Elapsed:: 0.1003580093383789ms DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/serve-static 1 undefined Project: /Users/anasyusef/[REDACTED]/tsconfig.json WatchType: Failed Lookup Locations
Info 189  [19:45:08.594] DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/node_modules/@types 1 undefined Project: /Users/anasyusef/[REDACTED]/tsconfig.json WatchType: Type roots
Info 190  [19:45:08.595] Elapsed:: 0.3427630066871643ms DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/node_modules/@types 1 undefined Project: /Users/anasyusef/[REDACTED]/tsconfig.json WatchType: Type roots
Info 191  [19:45:08.595] Finishing updateGraphWorker: Project: /Users/anasyusef/[REDACTED]/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed: 12755.324132978916ms
Info 192  [19:45:08.595] Project '/Users/anasyusef/[REDACTED]/tsconfig.json' (Configured)
Info 193  [19:45:08.731] 	Files (1389)
...
/Users/anasyusef/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210922/node_modules/typescript/lib/lib.es2020.string.d.ts
	/Users/anasyusef/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210922/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts
	/Users/anasyusef/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210922/node_modules/typescript/lib/lib.es2020.intl.d.ts
	/Users/anasyusef/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210922/node_modules/typescript/lib/lib.es2021.promise.d.ts
	/Users/anasyusef/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210922/node_modules/typescript/lib/lib.es2021.string.d.ts
	/Users/anasyusef/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210922/node_modules/typescript/lib/lib.es2021.weakref.d.ts
	/Users/anasyusef/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210922/node_modules/typescript/lib/lib.esnext.intl.d.ts
	/Users/anasyusef/[REDACTED]/node_modules/@types/node/assert.d.ts
	/Users/anasyusef/[REDACTED]/node_modules/@types/node/assert/strict.d.ts
	/Users/anasyusef/[REDACTED]/node_modules/@types/node/globals.d.ts
	/Users/anasyusef/[REDACTED]/node_modules/@types/node/async_hooks.d.ts
	/Users/anasyusef/[REDACTED]/node_modules/@types/node/buffer.d.ts
...
Info 194  [19:45:08.746] -----------------------------------------------
Info 195  [19:45:08.772] FileWatcher:: Added:: WatchInfo: /users/anasyusef/[REDACTED]/package.json 250 undefined WatchType: package.json file for import suggestions
Info 196  [19:45:08.811] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1*
Info 197  [19:45:08.830] DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/node_modules 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations
Info 198  [19:45:08.832] Elapsed:: 2.044902980327606ms DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/node_modules 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations
Info 199  [19:45:09.309] DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/@emotion 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations
Info 200  [19:45:09.309] Elapsed:: 0.07886505126953125ms DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/@emotion 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations
Info 201  [19:45:09.310] DirectoryWatcher:: Added:: WatchInfo: /Users/anasyusef/[REDACTED]/next 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations

tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "baseUrl": ".",
    "paths": {
      "@/components/*": ["components/*"],
      "@/firebase/*": ["firebase/*"]
    },
    "jsx": "preserve"
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
  "exclude": ["node_modules"]
}

🙁 Actual behavior

Intellisense gets stuck indefinitely in Loading... when looking for suggestions

🙂 Expected behavior

Intellisense should give suggestions

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
anasyusefcommented, Sep 29, 2021

I managed to get it working to give suggestions as it should. I created a new NextJS project (using create-next-app), carefully copied the files, and installed the packages from the old project to the new one to check what might have caused the error. Unfortunately, I couldn’t find the root cause, but I did get it back working. Let me know if you still want to have a peek at the source code or if we should close this issue

1reaction
anasyusefcommented, Sep 24, 2021

I ran the npx tsc command, and it took a while (30+ mins, and still wasn’t done). The project is not big at all. It only has around five pages and about 15 components.

Here’s my package.json:

{
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@emotion/react": "^11.4.1",
    "@emotion/server": "^11.4.0",
    "@emotion/styled": "^11.3.0",
    "@mui/icons-material": "^5.0.0-rc.1",
    "@mui/lab": "^5.0.0-alpha.47",
    "@mui/material": "^5.0.0-rc.1",
    "axios": "^0.21.4",
    "firebase": "^9.0.2",
    "firebase-admin": "^9.11.1",
    "lodash": "^4.17.21",
    "next": "11.1.2",
    "next-absolute-url": "^1.2.2",
    "next-auth": "^4.0.0-beta.2",
    "next-firebase-auth": "^1.0.0-canary.1",
    "notistack": "^1.0.6-next.3",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-hook-form": "^7.15.4",
    "react-query": "^3.24.3",
    "recharts": "^2.1.2",
    "yup": "^0.32.9"
  },
  "devDependencies": {
    "@types/react": "17.0.21",
    "dotenv": "^10.0.0",
    "eslint": "7.32.0",
    "eslint-config-next": "11.1.2",
    "typescript": "^4.4.3"
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Intellisense loading forever - visual studio - Stack Overflow
1) If your project is created by other previous vs version, please close VS Instance, delete .vs hidden folder, bin , obj folder,...
Read more >
How To Fix Visual Studio Code IntelliSense Loading Infinitely
Fixing Visual Studio Code IntelliSense Loading Infinitely​​ If it doesn't work straightaway, you might need restarting your VS Code editor.
Read more >
Intellisense shows loading indefinitely · Issue #87870 - GitHub
Open a project in visual studio code(React). ... 3.You can find the intellisense working perfectly. 4.Do npm install (add node modules) then try ......
Read more >
intellisense stuck at "Loading Intellisense"
A simple bounce of VS is insufficient, as the problem will eventually return. I have to rename the files, bounce, and then the...
Read more >
Intellisense Loading Forever - ADocLib
Learn how to improve Visual Studio performance if you find that it is running slowly. You may have extensions installed that are slowing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found