DEV Community

Discussion on: The beauty of Docker for local Laravel development

Collapse
 
xavoski profile image
Xavoski

Hi,
Thanks for your post and git repo. Great work.
I am facing a chalenge to run npm commands in npm container.
I started an project with Laravel and Vue, but i can't run npm commands to compile Vue components.
I installed npm on my machine, runned "npm run watch" and it works great, but how can i run this command using the npm container?
After docker-compose up -d, all containers are done well, but only three remain running "nginx, mysql and php", that is ok, but how can i run and exec comands in npm?
Sory my verbosity and of course my english.

Collapse
 
xavoski profile image
Xavoski

Well, i start with my apologies.
I ran npm command using:
$ docker-compose run --rm npm run watch
But i will use this to ask if this (keep run watch open in terminal) is the best way to recompile Vue components?