I used Vue CLI to build vue project on GitHub actions like below:
name: ticket app CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g @vue/cli@latest
- name: Build App
working-directory: .
run: |
npm install
npm run build
but the syntax runs with error and can not be complete.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1053 packages from 457 contributors, updated 17 packages and audited 31510 packages in 19.722s
38 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
sh: 1: vue-cli-service: Permission denied
npm ERR! code ELIFECYCLE
> [email protected] build /home/runner/work/Aiki-HelpDesk/Aiki-HelpDesk
npm ERR! errno 126
> vue-cli-service build
npm ERR! [email protected] build: `vue-cli-service build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2020-02-23T09_50_50_166Z-debug.log
##[error]Process completed with exit code 126.
Hello, thank you for taking time filling this issue!
However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).
I hope to see your helper-created issue very soon!
i removed node_module folder and fixed
I also fixed with the following commands
rm -rf node_modules/
npm install
For anyone with same issue when creating Docker.
I was facing the same permission denied issue when creating a docker for deployment.
This occured at npm run build...
Dockerfile is as follows....
FROM node:12.16.3-alpine as build-vue
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY ./frontend/package*.json ./
RUN npm install
COPY ./frontend .
RUN npm run build
The problem was that at COPY ./frontend original node_module folder was also being copied and it replaced the folder generated by RUN npm install.....
This can cause problem especially if you used windows for development and wanted to deploy in linux in Docker....
SO just remove your node_modules folder before you start give docker build command.... and this will work and no permission denied issue....
I wonder why it gave permission denied and not file incompatible error....
Wasted a lot of time wanted to save others time and hope it solves your problem...
Most helpful comment
I also fixed with the following commands