sh: nuxt-ts: not found when building in a Docker container
See original GitHub issueDockerfile:
FROM node:12-alpine
ENV APP_ROOT /site
RUN mkdir ${APP_ROOT}
WORKDIR ${APP_ROOT}
ADD . ${APP_ROOT}
RUN npm i
RUN npm run build
ENV HOST 0.0.0.0
When i build an image, i get an erorr: sh: nuxt-ts: not found
My package.json:
{
"name": "serke-client",
"version": "1.0.0",
"description": "Serke client",
"author": "Alexander Kim",
"private": true,
"scripts": {
"dev": "nuxt-ts",
"build": "nuxt-ts build",
"start": "nuxt-ts start",
"generate": "nuxt-ts generate",
"lint": "eslint --ext .ts,.js,.vue ."
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.25",
"@fortawesome/free-brands-svg-icons": "^5.11.2",
"@fortawesome/free-solid-svg-icons": "^5.11.2",
"@fortawesome/vue-fontawesome": "^0.1.7",
"@nuxt/typescript-runtime": "^0.2.2",
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/style-resources": "^1.0.0",
"@nuxtjs/svg": "^0.1.6",
"bootstrap": "^4.1.3",
"bootstrap-vue": "^2.0.0",
"nuxt": "^2.0.0",
"nuxt-fontawesome": "^0.4.0",
"vue-property-decorator": "^8.3.0"
},
"devDependencies": {
"@nuxt/typescript-build": "^0.3.2",
"@nuxtjs/eslint-config": "^1.0.1",
"@nuxtjs/eslint-config-typescript": "^0.1.3",
"@nuxtjs/eslint-module": "^1.0.0",
"babel-eslint": "^10.0.1",
"eslint": "^6.1.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-nuxt": ">=0.4.2",
"eslint-plugin-prettier": "^3.0.1",
"node-sass": "^4.12.0",
"prettier": "^1.16.4",
"sass-loader": "^8.0.0"
}
}
Locally i can build it, but within a docker container - not, what do i miss @kevinmarrec ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:24
Top Results From Across the Web
nuxt: not found inside docker image - Stack Overflow
Why is the nuxt command not found inside the docker container? Am I doing something wrong? Does anyone know how I can fix...
Read more >[Solved]-nuxt: not found inside docker image-docker
On my dockerfile I had this line of code COPY .npmrc package.json sdx ./ . Sdx is an internal package of my company...
Read more >Deploy Nuxt on Koyeb Serverless Platform with Docker
In this guide, we showcase how to dockerize and deploy a Nuxt application on the Koyeb platform. Koyeb allows you to deploy Docker...
Read more >10 best practices to containerize Node.js web applications ...
Node.js Alpine is an unofficial Docker container image build that is ... <missing> About a minute ago RUN |1 NPM_TOKEN=1234 /bin/sh -c echo ......
Read more >Image Layer Details - jiramot/nuxt-build:1 | Docker Hub
/bin/sh -c apk add --no-cache. 2.14 MB. 7. COPY file:238737301d47304174e4d24f4def935b29b3069c03c72ae8de97d94624382fce in /usr/local/bin/.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Overall I think you can’t npm run command through
RUN
cause of some environment the command is run dunno You can maybe tryEDIT : ultimately :
in your volume section in docker-compose.yml add node_modules volume
example : volumes: - ./src/client:/app/client - /app/client/node_modules