-
I've setup AdonisJS project with I've noticed that when AdonisJS fails to run in docker I can run it from my host machine and it will work fine. I'm on 2020 Macbook Pro i5 Things I tried:
Here are the following configurations:
docker-compose.yml
Dockerfile
Full error from docker console
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I've found a fix, apparently what happens (not sure why) is Heres the fix:
My understanding is that when you pull project and do I'm not sure why it skips installing correct ones on docker image but this is what causes issues. |
Beta Was this translation helpful? Give feedback.
-
If your problem is locally, I mean, you are using docker-compose pay attention to the shared volumes, probably it is sharing the wrong file between your windows system and your container running linux. You can solve it excluding your node_modules from the sharing volumes from you docker-compose.yml file like this:
|
Beta Was this translation helpful? Give feedback.
I've found a fix, apparently what happens (not sure why) is
node_modules/@swc/core
installs wrong optional packages within docker container.Heres the fix:
WORKDIR
core-darwin-x64
orcore-win-32-x64-msvc
or similar fromnode_modules/@swc/core
.core-linux-x64-gnu
andcore-linux-x64-muscl
(if your docker image is linux)npm install
from within docker container (this time you should see correct packages in@swc/core
undernode_modules/
)My understanding is that when you pull project and do
npm install
on host machine which is macOS or Windows, swc installs right packages for your host system.I'm not sure why it skips installing co…