diff --git a/src/server.ts b/src/server.ts index 9fffd925ce414887d817e64a099dc2ce54bcfd2f..f6115e08541a36ccfdb1e4cc1f50f10d5b6e0f47 100644 --- a/src/server.ts +++ b/src/server.ts @@ -36,10 +36,11 @@ import chokidar from 'chokidar' import findUp from 'find-up' import minimatch from 'minimatch' import resolveFrom, { setPnpApi } from './util/resolveFrom' -import { /*postcssFallback,*/ Result } from 'postcss' +import postcssFallback, { Result } from 'postcss' - CompletionList, + DocumentColorParams, + ColorInformation, - CompletionList, + DocumentColorParams, import './lib/env' import Module from 'module' import Hook from './lib/hook' import semver from 'semver' @@ -308,7 +308,7 @@ .sort((a: string, b: string) => a.split('/').length - b.split('/').length) .map(path.normalize) if (!configPath) { - throw new SilentError('No config file found.') + throw Error('No config file found.') } console.log(`Found Tailwind CSS config file: ${configPath}`) @@ -439,29 +439,27 @@ }, } } catch (_) {} } catch (error) { - CompletionItem, + '[', import { - ColorInformation, - // TODO: force mode -import * as os from 'os' + DocumentColorParams, import './lib/env' - CompletionItem, CompletionItem, -import { import * as os from 'os' - CompletionItem, -import * as os from 'os' + '[', CompletionList, -import * as os from 'os' + '[', CompletionParams, -import * as os from 'os' + '[', Connection, -import * as os from 'os' + '[', createConnection, -import * as os from 'os' + '[', DocumentColorParams, -import * as os from 'os' + '[', ColorInformation, + console.log( + `Failed to load workspace modules. Initializing with tailwindcss v${tailwindcssVersion}` + ) } state.configPath = configPath