#vite fails to load 'isCSSRequest'

1 messages · Page 1 of 1 (latest)

grave sun
#

Hey,
I'm trying to run a project on a different computer than the one I initiated it,
And i'm getting an error when starting dev server:

failed to load config from C:\XXXXXXXXXXXXXXXXXXXX\vite.config.js
error when starting dev server:
file:///C:/XXXXXXXXXXXXXXXXXXXX/node_modules/@vitejs/plugin-vue/dist/index.mjs:2
import { isCSSRequest, normalizePath as normalizePath$1, transformWithEsbuild, formatPostcssSourceMap, createFilter } from 'vite';
         ^^^^^^^^^^^^
SyntaxError: The requested module 'vite' does not provide an export named 'isCSSRequest'

Any ideas how to solve?

tawdry nebula
#

you need to upgrade Vite to latest

grave sun
#

I am already using version 4.0.4 which seems to be the latest.
Any other idea?
For now I just removed "isCSSRequest" from the import and everything is working fine, for developing, but I don't know what will be the consequences for production as I didn't try to build yet.

tawdry nebula
#

The isCSSRequest API is only exposed in Vite 4, not Vite 3, so I’m not sure why that didn’t fix it. Maybe there’s two copies of Vite?