'vue not found in docker container
I am trying to run vue/cli in a docker container.
I started the container went to cli of the container through docker exec -it command and entered the command npm install @vue/cli. Now, when I see the package.json file of the container, I see the package installed but when I try to create a project with the command vue create <project-name> it shows vue command not found.
{
"name": "node_dock_2",
"version": "1.0.0",
"description": "node with docker with vue.js",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"keywords": [
"website",
"Docker",
"vue.js",
"vue/cli"
],
"author": "Viraj",
"license": "ISC",
"dependencies": {
"@vue/cli": "^4.5.15",
"express": "^4.17.2"
}
}
This is the message when I try to install @vue/cli: (npm install @vue/cli)
up to date, audited 943 packages in 12s
68 packages are looking for funding
run `npm fund` for details
14 vulnerabilities (6 moderate, 8 high)
To address issues that do not require attention, run:
npm audit fix
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
This is my Dockerfile (Dockerfile, index.js and package.json are in same directory).
FROM node
WORKDIR /
COPY . .
RUN npm install
CMD ["node", "/index.js"]
What am I doing wrong?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

