edbizarro / gitlab-ci-pipeline-php

:coffee: Docker images for test PHP applications with Gitlab CI (or any other CI platform!)
https://hub.docker.com/r/edbizarro/gitlab-ci-pipeline-php
MIT License
529 stars 167 forks source link

npx: command not found #96

Closed Daniel-Mendes closed 4 years ago

Daniel-Mendes commented 4 years ago

How can I use npx in my pipeline to run npx stylelint resources/sass/**/*.scss ?

I have the error /bin/bash: line 95: npx: command not found

I try npm install -g npx in before_script, but I got npm WARN checkPermissions Missing write access to /usr/lib

Do I have to add npx to my package.json

PS: I use image: edbizarro/gitlab-ci-pipeline-php:7.4-alpine

Daniel-Mendes commented 4 years ago

Work around:

I installed npx as dev dependency

And in pipeline node_modules/.bin/npx stylelint resources/sass/**/*.scss

edbizarro commented 4 years ago

hi @Daniel-Mendes are you still facing this problem?

Daniel-Mendes commented 4 years ago

I don't remember, i need to try again.

edbizarro commented 4 years ago

ok, if still happen please open up another issue, thanks!