-
Notifications
You must be signed in to change notification settings - Fork 346
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
Typescript docker build pass but fail to start #1520
Comments
Hey, what operating system are you running? Could you also give some more context regarding how you set up the app? Did you create it as part of a npm workspace, or is it standalone? |
docker-inspect.json |
@crorvigvp yeah that it’s. How to fix it ? |
I ran into a similar problem and it's crazy that no one fixed it for a few weeks! I made an app with the command encore app create --example=ts/uptime Then I tried to build with the command encore build docker b2b --skip-config I tried to run with the command docker run -e PORT=8081 -p 8081:8081 b2b but there was an error: C:\Windows\System32>docker run -e PORT=8081 -p 8081:8081 b2b
node:internal/modules/esm/resolve:857
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'encore.dev' imported from /artifacts/0/build/combined/combined/main.mjs
at packageResolve (node:internal/modules/esm/resolve:857:9)
at moduleResolve (node:internal/modules/esm/resolve:926:18)
at defaultResolve (node:internal/modules/esm/resolve:1056:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:650:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:599:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:582:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:241:38)
at ModuleJob._link (node:internal/modules/esm/module_job:132:49) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v23.1.0 Encore version is v1.43.12, and I'm on Windows 10 Pro 22H2 19045.2604 with service pack 120.2212.4190. Docker version
|
Can anyone help? |
We're going to look into this in the near future. It appears to be due to how symlinks work on windows. Until then you can build Docker images using WSL or a macOS/Linux machine. |
Not better on linux
|
@lpkobamn you need to provide a infra config, see https://encore.dev/docs/ts/self-host/configure-infra |
If you update to encore v1.45.1 it should now work to run on windows, try it out with There are a few edge cases still on windows that we are hunting down, but this particular issue should now be solved. Let me know how it works |
I use hello world template typescript
When i command docker run …. Its it failed
log show “cannot find module encore.dev
The text was updated successfully, but these errors were encountered: