Skip to content

[Development] Docker is not properly starting the app in dev mode #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tudoramariei opened this issue Mar 6, 2025 · 0 comments
Open
Labels
bug 🐛 Something isn't working

Comments

@tudoramariei
Copy link
Member

tudoramariei commented Mar 6, 2025

Describe the bug
Started the project with make run and it's only showing this output:

> dev
> vite

sh: 1: vite: not found
2025-03-07 10:52:58 > dev
2025-03-07 10:52:58 > vite
2025-03-07 10:52:58 
2025-03-07 10:52:58 failed to load config from /var/www/redirect/backend/vite.config.js
2025-03-07 10:52:58 error when starting dev server:
2025-03-07 10:52:58 Error: 
2025-03-07 10:52:58 You installed esbuild for another platform than the one you're currently using.
2025-03-07 10:52:58 This won't work because esbuild is written with native code and needs to
2025-03-07 10:52:58 install a platform-specific binary executable.
2025-03-07 10:52:58 
2025-03-07 10:52:58 Specifically the "@esbuild/darwin-arm64" package is present but this platform
2025-03-07 10:52:58 needs the "@esbuild/linux-arm64" package instead. People often get into this
2025-03-07 10:52:58 situation by installing esbuild on Windows or macOS and copying "node_modules"
2025-03-07 10:52:58 into a Docker image that runs Linux, or by copying "node_modules" between
2025-03-07 10:52:58 Windows and WSL environments.
2025-03-07 10:52:58 
2025-03-07 10:52:58 If you are installing with npm, you can try not copying the "node_modules"
2025-03-07 10:52:58 directory when you copy the files over, and running "npm ci" or "npm install"
2025-03-07 10:52:58 on the destination platform after the copy. Or you could consider using yarn
2025-03-07 10:52:58 instead of npm which has built-in support for installing a package on multiple
2025-03-07 10:52:58 platforms simultaneously.
2025-03-07 10:52:58 
2025-03-07 10:52:58 If you are installing with yarn, you can try listing both this platform and the
2025-03-07 10:52:58 other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
2025-03-07 10:52:58 feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
2025-03-07 10:52:58 Keep in mind that this means multiple copies of esbuild will be present.
2025-03-07 10:52:58 
2025-03-07 10:52:58 Another alternative is to use the "esbuild-wasm" package instead, which works
2025-03-07 10:52:58 the same way on all platforms. But it comes with a heavy performance cost and
2025-03-07 10:52:58 can sometimes be 10x slower than the "esbuild" package, so you may also not
2025-03-07 10:52:58 want to do that.
2025-03-07 10:52:58 
2025-03-07 10:52:58     at generateBinPath (/var/www/redirect/backend/node_modules/esbuild/lib/main.js:1742:17)
2025-03-07 10:52:58     at esbuildCommandAndArgs (/var/www/redirect/backend/node_modules/esbuild/lib/main.js:1823:33)
2025-03-07 10:52:58     at ensureServiceIsRunning (/var/www/redirect/backend/node_modules/esbuild/lib/main.js:1980:25)
2025-03-07 10:52:58     at build (/var/www/redirect/backend/node_modules/esbuild/lib/main.js:1879:26)
2025-03-07 10:52:58     at bundleConfigFile (file:///var/www/redirect/backend/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:53989:24)
2025-03-07 10:52:58     at async loadConfigFromFile (file:///var/www/redirect/backend/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:53958:21)
2025-03-07 10:52:58     at async resolveConfig (file:///var/www/redirect/backend/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:53474:24)
2025-03-07 10:52:58     at async _createServer (file:///var/www/redirect/backend/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:43702:18)
2025-03-07 10:52:58     at async CAC.<anonymous> (file:///var/www/redirect/backend/node_modules/vite/dist/node/cli.js:746:20)
@tudoramariei tudoramariei added the bug 🐛 Something isn't working label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant