Open ronreiter opened 4 years ago
Hi, thanks for reporting this issue. Let me try to figure out how it can be fixed.
@mandrews can you please look at this issue? Thanks!
@saasforge any idea how to fix this? Trying to use docker compose currently but stuck here
@ericvanular Can you please describe step-by-step your problem? Thanks!
@saasforge same issue as @ronreiter
I run docker-compose up and it throws an error with --> Error: Cannot find module '/app/webpack.dev.js'
I'm not very familiar with docker but I think it's because there is no such folder app. What is /app folder at all? If it's a root one, where do you define it? If it's defined by default, you probably should change it to just / Can you please try? P.S. webpack.dev.js can be found the root directory so probably for some reason docker looks it in non-existing folder app. P.S.2. Okay, I see the dockerfile has the following lines:
WORKDIR /app COPY . /app
I think if your workdir is not app, it shouldn't work?
Thanks @saasforge, I'm not super familiar with Docker either but the error is in Step 7/10: (RUN npm install --global npm && npm update && npm install && npm run dev)
I'll try to change the workdir name and report back
Was able to get the Docker image to build by switching the order of Step 7 and 8
COPY . /app
should be before
RUN npm install --global npm && \ npm update && \ npm install && \ npm run dev
@ericvanular Thanks a lot! Do you want to make update to the dockfile or you want me to do that?
No worries, I can make a PR in a bit
Cool, thanks!
Hi there,
The suggested change doesn't appear in the code. Is it normal?
No, it's not normal, it's just never been changed. Please feel free to create PR.
Fixed in 87d795580748d942ab43ea23e2462cbf97b3f2b5 Please try and let us know if there is still an issue.
Error: Cannot find module '/app/webpack.dev.js'
Happens because webpack.dev.js and webpack.common.js are not copied before the npm command. Need to fix the dockerfile.