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-bob
and 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/typescript
orsrc
path viatsconfig.json
, VSCode doesn't detect the exports for suggestions.Steps to Reproduce
Create a library using
react-native-builder-bob
Build 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-library
Troubleshooting Attempted
index.d.ts
is present in thelib/typescript
folderpaths
entry intsconfig.json
pointing to the build outputpaths
tosrc
directlyCmd+Shift+P > TypeScript: Restart TS Server
)Screenshoots
Beta Was this translation helpful? Give feedback.
All reactions