You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In vscode, when working on a package under a Bazel workspace, the bazel build command will generate the node_modules directory in separate directory, instead of directly under the package itself. This causes the svelte language server not able to properly lint modules.
Here is an example error:
Error in svelte.config.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@sveltejs/adapter-auto' imported from /Users/<user>/<bazel-workspace-root>/<bazel-svelte-package>/svelte.config.js
I wonder if we can consider adding language server support for Bazel workspace, or any non-npm workspace where the node_modules directory is not located directly under the package itself?
Proposed solution
After creating a Svelte project in a Bazel workspace, the Svelte language server will work after running Bazel build on the Svelte Bazel target. At this point, a node_modules directory is created by Bazel, e.g. $(bazel info bazel-bin)/node_modes. The Svelte language server should be able to properly lint node modules in the Bazel created node_modules directory.
Alternatives
No response
Additional Information, eg. Screenshots
The text was updated successfully, but these errors were encountered:
Description
In vscode, when working on a package under a Bazel workspace, the
bazel build
command will generate thenode_modules
directory in separate directory, instead of directly under the package itself. This causes the svelte language server not able to properly lint modules.Here is an example error:
Here is an example file directory:
I wonder if we can consider adding language server support for Bazel workspace, or any non-npm workspace where the
node_modules
directory is not located directly under the package itself?Proposed solution
After creating a Svelte project in a Bazel workspace, the Svelte language server will work after running
Bazel build
on the Svelte Bazel target. At this point, anode_modules
directory is created by Bazel, e.g.$(bazel info bazel-bin)/node_modes
. The Svelte language server should be able to properly lint node modules in the Bazel creatednode_modules
directory.Alternatives
No response
Additional Information, eg. Screenshots
The text was updated successfully, but these errors were encountered: