Skip to content

Commit fdedff9

Browse files
committed
Fix error when using VSCode < 1.78
1 parent 1c77f60 commit fdedff9

File tree

1 file changed

+3
-1
lines changed
  • packages/tailwindcss-language-server/src

1 file changed

+3
-1
lines changed

packages/tailwindcss-language-server/src/tw.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { URI } from 'vscode-uri'
4141
import normalizePath from 'normalize-path'
4242
import * as path from 'node:path'
4343
import * as fs from 'node:fs/promises'
44+
import * as fsSync from 'node:fs'
4445
import type * as chokidar from 'chokidar'
4546
import picomatch from 'picomatch'
4647
import * as parcel from './watcher/index.js'
@@ -188,7 +189,8 @@ export class TW {
188189
let base = baseUri.fsPath
189190

190191
try {
191-
await fs.access(base, fs.constants.F_OK | fs.constants.R_OK)
192+
// TODO: Change this to fs.constants after the node version bump
193+
await fs.access(base, fsSync.constants.F_OK | fsSync.constants.R_OK)
192194
} catch (err) {
193195
console.error(
194196
`Unable to access the workspace folder [${base}]. This may happen if the directory does not exist or the current user does not have the necessary permissions to access it.`,

0 commit comments

Comments
 (0)