Build Built file does not work because of CORS error This can be caused by a circular dependency. If HMR is not handled by Vite or a plugin, a full reload will happen.Īlso if there is a dependency loop, a full reload will happen. If you are running Vite with WSL2, Vite cannot watch file changes in some conditions. Related issue: #964 Vite does not detect a file change As Vite does not bundle most of the files, browsers may request many files which require many file descriptors, going over the limit. If you are using Linux, file descriptor limits and inotify limits may be causing the issue. renaming / to / ĭev Server Requests are stalled forever .adding 'type': 'module' to the nearest package.json.We recommend converting your config to ESM by either: This package is ESM only but it was tried to load by require. When importing a ESM only package by require, the following error happens.įailed to resolve 'foo'. Switch to another package manager (e.g.The path to your project folder may include &, which doesn't work with npm on Windows ( npm/cmd-shim#45).
CLI Error: Cannot find module 'C:\foo\bar&baz\vite\bin\vite.js' If the suggestions here don't work, please try posting questions on GitHub Discussions or in the #help channel of Vite Land Discord. See Rollup's troubleshooting guide for more information too.