[vite:load-fallback] Could not load /__w/[repo-name]/[repo-name]/src/__vite-browser-external (imported by __vite-browser-external?commonjs-proxy): ENOENT: no such file or directory, open '/__w/[repo-name]/[repo-name]/src/__vite-browser-external' #17829
-
Hello All, I'm in the process of migrating our legacy frontend app from Create React App (CRA) to Vite. The transition has had its challenges, but I'm nearly done. Everything is up and running locally, and I'm able to build the app successfully on my machine. However, I'm encountering an issue when deploying the app through my GitHub Actions workflow. Specifically, I'm receiving the following error during the deployment job:
this is my vite.config.js import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import jsconfigPaths from 'vite-jsconfig-paths';
import eslintPlugin from 'vite-plugin-eslint';
export default defineConfig({
build: {
outDir: 'build',
sourcemap: true,
},
plugins: [react(), jsconfigPaths(), eslintPlugin()],
server: {
open: true,
port: 3000,
},
}); I'm not sure how to debug this or where to start, your help is much appreciated 🙏🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I removed some packages from my app, and I hit a different error! |
Beta Was this translation helpful? Give feedback.
-
after many many hours, the issue was with vite-jsconfig-paths it plays well with esbuild in development but it didn't play well with rollup on production for an unknown reason to me atm .. |
Beta Was this translation helpful? Give feedback.
after many many hours, the issue was with vite-jsconfig-paths it plays well with esbuild in development but it didn't play well with rollup on production for an unknown reason to me atm ..
I fixed the issue by replicating my aliases from from
jsconfig
invite.config