Skip to content

Commit 888e042

Browse files
Fix error when using VSCode < 1.78 (#1353)
Fixes #1350
1 parent f425059 commit 888e042

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-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.`,

packages/vscode-tailwindcss/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Ignore some build caches by default ([#1336](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1336))
99
- Gracefully handle color parsing failures ([#1363](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1363))
1010
- Calculate swatches for HSL colors with angular units ([#1360](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1360))
11+
- Fix error when using VSCode < 1.78 ([#1353](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1353))
1112
- Don’t skip suggesting empty variant implementations ([#1352](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1352))
1213

1314
# 0.14.16

0 commit comments

Comments
 (0)