Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP-SUGAR: typescript language server raises skeleton module found but not resolved in tailwind.config.ts #2877

Open
Haiz14 opened this issue Oct 17, 2024 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@Haiz14
Copy link

Haiz14 commented Oct 17, 2024

Current Behavior

This error doesn't affect the working of skeleton, only the lsp complains.

Follow reproducing section, and an error like this will be raised by typescript server language server.

 │     Cannot find module '@skeletonlabs/skeleton/plugin' or its corresponding type declarations. typescript (2307) [3, 26]
 │        There are types at '/data/data/com.termux/files/home/teste-skeleton-next/node_modules/@skeletonlabs/skeleton/dist/plugin/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'. 

Typescript language server version ❯ typescript-language-server --version 4.3.3

Expected Behavior

LSP shouldn't raise this error.

Steps To Reproduce

  1. Standard installation of skeleton-next sveltekit via https://next.skeleton.dev/docs/get-started/installation/sveltekit
  2. Final tailwind.config.ts should be something like
import type { Config } from 'tailwindcss';
import { join } from 'path';
import { skeleton } from '@skeletonlabs/skeleton/plugin';
import * as themes from '@skeletonlabs/skeleton/themes';

export default {
	content: [
		'./src/**/*.{html,js,svelte,ts}',
		join(require.resolve('@skeletonlabs/skeleton-svelte'), '../**/*.{html,js,svelte,ts}')
	],

	theme: {
		extend: {}
	},

	plugins: [
		skeleton({
			themes: [
				themes.rose,
				themes.cerberus,
			],
		})
	]
} as Config;
  1. Check your typescript lsp errors. It should show the expected error.

Link to Reproduction / Stackblitz

No response

More Information

tsconfig.json 's modupeResolution is bundler

@Haiz14 Haiz14 added the bug Something isn't working label Oct 17, 2024
@Haiz14 Haiz14 changed the title LSP-SUGAR: typescript server raises skeleton module found but not resolved in tailwind.config.ts LSP-SUGAR: typescript language server raises skeleton module found but not resolved in tailwind.config.ts Oct 17, 2024
@Haiz14
Copy link
Author

Haiz14 commented Oct 17, 2024

not reproducible in vscode, should i close it? It only occurs in my neovim lsp.

@endigo9740
Copy link
Contributor

@Haiz14 we'll leave it for now for documentation sake.

@endigo9740 endigo9740 added this to the v3.0 (Next) milestone Oct 17, 2024
@Xenon27
Copy link

Xenon27 commented Oct 28, 2024

I have a similar thing in VS-Code

Bildschirmfoto 2024-10-28 um 17 32 58

@endigo9740
Copy link
Contributor

endigo9740 commented Oct 28, 2024

@Haiz14 @Xenon27 I was able to replicate a similar issue last week when testing Skeleton for a Next.js project with Turbopack enabled. Can the two of you confirm which framework you're using.

  1. SvelteKit | Next.js | other
  2. If Next.js are you using Turbopack: Yes/No

EDIT Haiz I see you linked to the SvelteKit docs, so I'm going to assume this is what you were using. But I'll let you confirm.

@Xenon27
Copy link

Xenon27 commented Oct 28, 2024

I am using SvelteKit

@Haiz14
Copy link
Author

Haiz14 commented Oct 29, 2024

Sveltekit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants