docker-library / php

Docker Official Image packaging for PHP
https://php.net
MIT License
3.79k stars 2k forks source link

npm not found #1402

Closed welly closed 1 year ago

welly commented 1 year ago

I'm having a problem in that Robo fails on:

$tasks[] = $this->taskExec('npm install cypress@9 --save-dev');

reporting npm not being found. Also adding which npm to the bitbucket cypress step doesn't report finding anything, whereas it does find node:

    - step: &cypress-tests
        name: 'Cypress.IO'
        services:
          - mariadb
        script:
          - sleep 10
          - which node
          - which npm
          - robo job:build
          - vendor/bin/robo job:serve-drupal
          - vendor/bin/robo job:cypress-tests

Wondered if anyone had any suggestions?

sbuerk commented 1 year ago

If you are using the php images, there is no node/npm installed. You have to install them first. Maybe you should use other images than the php image, if you need node/npm ?

Or some images having both in there.

Shortly said: Your problem is expecting a software in the image, which it simply does not contains.

welly commented 1 year ago

It seems I've posted my question in the wrong repo. Apologies!