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.

Import statement completions don't work if in front of certain statements

See original GitHub issue

Bug Report

🔎 Search Terms

  • suggest / suggestions
  • complete / completions
  • import statement completions
  • completionInfo

🕗 Version & Regression Information

4.4.0-dev.20210722

Not a regression

💻 Code

For a JS file:

import 

join('a', 'b')

Start typing join after import to add an import for the path node module

🙁 Actual behavior

No suggestions returned

🙂 Expected behavior

We’d expect import statement suggestions for join. If I comment out join('a', 'b'), I see this working as expected

The specific response is for the completionInfo request is:

Success: false . Message: No content available.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hrishikeshnikam2000commented, Jul 30, 2021

I’m sorry about that. I tried to understand the issue but couldn’t resolve it.

0reactions
andrewbranchcommented, Jul 29, 2021

I’m not actually sure if this qualifies as a “good first issue” but go for it 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import statement completions #43149 - microsoft/TypeScript
Enables auto-import-style completions on import statements themselves, e.g. ... we do less expensive work up front, even with the caches are totally empty....
Read more >
Should import statements always be at the top of a module?
This answer focuses on the import statement cost, but not the cost of what is being imported. Take into consideration the library being...
Read more >
VS Code tips: Import statement completions in JavaScript and ...
Today's VS Code tip: import statement completionsWrite 'import' followed by the symbol you want to import and VS Code will help you complete ......
Read more >
Absolute vs Relative Imports in Python
Absolute imports are preferred because they are quite clear and straightforward. It is easy to tell exactly where the imported resource is, just...
Read more >
Auto import | IntelliJ IDEA Documentation
In the Settings/Preferences dialog ( Ctrl+Alt+S ), click Editor | General | Auto Import. Select the Add unambiguous imports on the fly checkbox ......
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