0

As mentioned in the subject line I'm getting TypeError: Expected pattern to be a non-empty string at picomatch$3 file:///node_modules/vite/dist/node/chunks/dep-Beq30MX9.js when running npm run dev.

.

I get the error mentioned above while following this YouTube video: https://www.youtube.com/watch?v=-Bc26CpA7LU&t=303s

Node.js v22.14.0

1 Answer 1

0

Switch to Node.js v20.x (LTS) unless you specifically need v22 hope this will fix your error.

2
  • Thanks however I still get the same error after switching to Node.js version v20.19.0.
    – Tim Kruger
    Commented Apr 13 at 9:31
  • After installation, you should delete and reinstall dependencies. And make sure vite.config.js / vite.config.ts doesn't contain any empty strings. it should looks like this plugins: [somePlugin('valid-pattern')] Also check resolve.alias or server.watch configurations. Commented Apr 13 at 9:43

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.