Vscode: Import statement Intellisense problem and suggestions for the imported

Created on 12 Aug 2019  路  13Comments  路  Source: microsoft/vscode

Import statement intellisense doesn't work for some cases like this

First

This must complete @sapper/app.mjs as it is a module related to the directory
this is my directory

Screenshot (3)

But I found an extension that does that trick see when enabling it the matter works

Second

But the problem is that the imported module doesn't have intellisense see here

Third

This should have completed sapper.start and other methods like sapper.goto They are exported from that file

Screenshot (4)

So, what to do here? Am I missing something or configuration?

*question javascript

All 13 comments

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

Please share steps to reproduce this issue (possible with a small example project)

/needsMoreInfo

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

First I am on node 10.16.0 and the latest vs code version

Reproduce Steps:

  1. run command npx degit sveltejs/sapper-template#rollup Starter to generate the project.
  2. open the project in vs code and the client.js in the src folder and erase everything in it
  3. try what happens in the gif pictures above

Side Note:
The extension I mentioned in my above comment is here https://marketplace.visualstudio.com/items?itemName=leizongmin.node-module-intellisense

Have you ran into a problem about creating sapper project???

@mjbvz Is there any news about the issue??

Hey. Why have this issue been forgotten? Is there anyone can help???

If you want support for individual problems, try asking on stackoverflow. This is likely a config issue with your project

I'll look into it but it isnt a priority

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

This is currently the only open issue that references '.mjs' -- is there anyway to get MJS files treated as JS files? .mjs is now often a required extension for ES modules (strangely, not .mes...)

This is a configuration issue.

'@sapper' is not an import that our IntelliSense can understand by default. You can confirm this by enabling semantic checking in the js file.

At starting point, create a jsconfig.json and configure paths so that VS Code can resolve @sapper to the correct location

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shanalikhan picture shanalikhan  路  3Comments

trstringer picture trstringer  路  3Comments

villiv picture villiv  路  3Comments

philipgiuliani picture philipgiuliani  路  3Comments

trstringer picture trstringer  路  3Comments