VSCode doesn't suggest auto-imports for linked local library (link:) #868
              
                Unanswered
              
          
                  
                    
                      WallysonGalvao
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When using a local library created with
react-native-builder-boband installed via a relativelink:inpackage.json, VSCode fails to suggest auto-imports for functions/components from the library—even though the code runs and the imports work manually.The library is installed as:
Even after pointing to the correct
lib/typescriptorsrcpath viatsconfig.json, VSCode doesn't detect the exports for suggestions.Steps to Reproduce
Create a library using
react-native-builder-bobBuild it using
yarn build(generatinglib/typescript)In another project, install the library using:
In the consuming project:
Add to
tsconfig.json:Try to auto-import any exported function/component from the library
Expected Behavior
VSCode should suggest and auto-import symbols from the linked local library as it does for normal packages or local files.
Actual Behavior
Environment
link:../awesome-libraryTroubleshooting Attempted
index.d.tsis present in thelib/typescriptfolderpathsentry intsconfig.jsonpointing to the build outputpathstosrcdirectlyCmd+Shift+P > TypeScript: Restart TS Server)Screenshoots
Beta Was this translation helpful? Give feedback.
All reactions