Skip to content

Typescript - add missing import #22648

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
ddyrcz opened this issue Mar 15, 2017 · 3 comments
Closed

Typescript - add missing import #22648

ddyrcz opened this issue Mar 15, 2017 · 3 comments
Assignees
Labels
javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Milestone

Comments

@ddyrcz
Copy link

ddyrcz commented Mar 15, 2017

  • VSCode Version: 1.10.2
  • OS Version: Win 10

Steps to Reproduce:

  1. Fetch some package from the npm (in my case it was angular2-moment)
  2. Go to the app.module file
  3. Add to the imports array the new module to import (in my case it was MomentModule)
  4. Try to add missing import - CTRL + .
  5. No missing import is added
@mjbvz mjbvz added the info-needed Issue requires more information from poster label Mar 15, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Mar 15, 2017

@ddyrcz Can you please provide some example code?

Also, is the file you are working with named app.module with no .js or .ts extension? The TypeScript server we use to power our JS and TS intellisense only supports imports/modules for files that have one the these extensions: .js, .jsx, .ts, .tsx. You may want to try adding the supported file extensions if this is the case

@mjbvz mjbvz added javascript JavaScript support issues typescript Typescript support issues labels Mar 15, 2017
@ddyrcz
Copy link
Author

ddyrcz commented Mar 16, 2017

Sory I forgot the extension. Of course I meant app.module.ts

I've create an sample git repository (it's just a new project generated with angular-cli 1.0.0-rc.1):
https://github.com/ddyrcz/vscode-typescript-issue

You can clone this and try to reproduce.

Steps:

  1. clone repository from the https://github.com/ddyrcz/vscode-typescript-issue.git
  2. install dependencies
  3. install angular2-moment (npm i angular2-moment)
  4. go to app.module.ts
  5. add MomentModule in the imports array

image

  1. try to add missing import

In my case no missing import is adding

@mjbvz mjbvz removed the info-needed Issue requires more information from poster label Mar 21, 2017
@mjbvz mjbvz added this to the April 2017 milestone Apr 11, 2017
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Apr 21, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 21, 2017

This issue was moved to microsoft/TypeScript#15309

@mjbvz mjbvz closed this as completed Apr 21, 2017
@jrieken jrieken added upstream Issue identified as 'upstream' component related (exists outside of VS Code) and removed bug Issue identified by VS Code Team member as probable bug labels Apr 26, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants