Skip to content

Trigger Node type acquisition on matching shebang #46278

Description

@Mlocik97

Version: 1.61.0
Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea
Date: 2021-10-07T18:11:02.929Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.11.0-37-generic

Steps to Reproduce:

  1. npm init -y
  2. set "type": "module"
  3. creating new index.js file
  4. writting fs doesn't sugget to import fs, so it doesn't add import fs from 'fs' line.

Activity

  1. removed their assignment
    on Oct 8, 2021
  2. mackelito commented on Oct 29, 2021

    @mackelito

    Same issue here...

    Version: 1.61.2
    Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643
    Date: 2021-10-19T15:49:28.381Z (1 wk ago)
    Electron: 13.5.1
    Chrome: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
    OS: Darwin x64 20.6.0
    
  3. added
    DuplicateAn existing issue was already created
    and removed
    Needs InvestigationThis issue needs a team member to investigate its status.
    on Oct 29, 2021
  4. andrewbranch commented on Oct 29, 2021

    @andrewbranch
    Member

    Duplicate of #46521. We don't assume you want to reference Node typings until you do it once in a project. You can either install @types/node or write your first import of a Node builtin by hand.

  5. Mlocik97 commented on Oct 29, 2021

    @Mlocik97
    Author

    Can't we automatically start intellisense for node, if env is set to node? I mean when files contain

    #!/usr/bin/env node

    ? It already should tell, content of file contain node code, and activate intellisense for it?

  6. andrewbranch commented on Oct 29, 2021

    @andrewbranch
    Member

    Yeah, that's a good suggestion.

  7. changed the title [-][JS] Autoimport doesn't work.[/-] [+]Trigger Node type acquisition on matching shebang[/+] on Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions