How can I obtain the packages in node_modules under the current project during extensions? #2746
Unanswered
Ladyfish030
asked this question in
Extension Development QnA
Replies: 1 comment
-
I just use the built-in VSCode provided function const pkg = 'web-tree-sitter'; // etc
const uri = vscode.Uri.joinPath(context.extensionUri, 'node_modules', pkg);
const path = uri.path; also make sure the package your trying to access is present when publishing the extension |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I tried the following two methods, but both resulted in a ‘MODULE_NOT_FOUND’ error.


Beta Was this translation helpful? Give feedback.
All reactions