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
vue-cli-service: not found inside Docker #5107
Comments
Also having this exact same issue right now. It works in Docker on macOS, but not Docker on Windows. But if I start the container through docker and attach shell to it and run If it makes any difference, a buddy was able to get the exact same repo/dockerfile working first try on his Windows 10 machine. 🤷♂ So its not Docker for Windows wide, but a problem with our individual PCs. As to what the problem is, I have no clue. |
Running that command didn't work for me in my docker-compose command. It would just say: Strangely enough, if I have ...Removing my local node-modules (cut and paste it outside the project), and running serve again with docker would get All I can say, I'm very confused what's going on. Is anonymous volume working properly? When docker builds the image, is it installing the packages properly? I suspect something went wrong in the installing, since in a fresh clean project without a local installed node-modules, the vue docker instance does not recognize any vue or vue cli's commands when I try to run it through docker-compose |
@Camper6 I think i'm having a similar issue as you. If my Dockerfile has So I'll tell you what I have tried.
I've about exhausted everything I can think of right now. |
I have the same problem, haven't found a way to fix |
It seems Downside is that you have to run |
Same here. When I mount src in a Windows folder |
Considering this issue does not happen on macOS, this might be a bug in Docker for Windows. |
I found my problem. I was inadvertently setting NODE_ENV to production in my docker-compose so all NPM dev dependencies (including vue-cli-service) were not being installed. |
We need to separate the CI/CD flow as below:
|
same issue, in builds in Kaniko |
Hi everyone, same error on my server with node_env set as production, removing it or installing all dependecies with |
Production means only the built bundle is to serve. |
Pre-configured In the context of Vue.js apps, it's for server-side rendering or static assets hosting. For a production Node.js server, you won't need any of the
The bundles should be built in the CI/CD pipeline. You should not pre-configure
So in conclusion: |
In Github Actions docker I had the issue even in NODE_ENV=development. A quick fix that did work for me is to install |
This approach didn't work for me, I get So far I can only deploy using firebase cli, Github actions is not working
|
This issue worked for me: #3506 |
So, this is what I've done to get this resolved the right way: In Dockerfile...
|
Version
4.1.2
Reproduction link
https://github.com/engblh/docker-for-vue-dev
Environment info
Steps to reproduce
Environment used:
docker version 2.2.0.0(42247) win 10 and WSL ubuntu 18.04
Docker engine 19.03.5, compose v1.25.2
What is expected?
expected to show default vue homepage
What is actually happening?
Successfully built 4166371f2e1a
Successfully tagged docker-vue:latest
Creating docker-vue ... done
Attaching to docker-vue
docker-vue |
docker-vue | > docker-for-vue-dev@0.1.0 serve /var/www/docker-vue
docker-vue | > vue-cli-service serve
docker-vue |
docker-vue | sh: 1: vue-cli-service: not found
docker-vue | npm ERR! file sh
docker-vue | npm ERR! code ELIFECYCLE
docker-vue | npm ERR! errno ENOENT
docker-vue | npm ERR! syscall spawn
docker-vue | npm ERR! docker-for-vue-dev@0.1.0 serve:
vue-cli-service serve
docker-vue | npm ERR! spawn ENOENT
docker-vue | npm ERR!
docker-vue | npm ERR! Failed at the docker-for-vue-dev@0.1.0 serve script.
docker-vue | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
docker-vue |
docker-vue | npm ERR! A complete log of this run can be found in:
docker-vue | npm ERR! /root/.npm/_logs/2020-01-24T15_45_29_935Z-debug.log
It was working a couple days ago on win 10, WSL ubuntu 18.04, but problem started happening since yesterday.
It works on MacOS, but not on Win 10, WSL Ubuntu 18.04
The text was updated successfully, but these errors were encountered: