I need to execute some
npx commands from a PHP (Symfony) app.
I’m already following this guide to add node/nvm to my setup (and to build some assets at the build hook).
I tried running
npx commands but I get the following error:
npx: not found.
So I added this step to the build hook:
npm install -g npx but then got this error when building:
W: npm ERR! code EEXIST
W: npm ERR! syscall symlink
W: npm ERR! path ../lib/node_modules/npx/index.js
W: npm ERR! dest /app/.nvm/versions/node/v12.16.1/bin/npx
W: npm ERR! errno -17
W: npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/npx/index.js' -> '/app/.nvm/versions/node/v12.16.1/bin/npx'
W: npm ERR! File exists: /app/.nvm/versions/node/v12.16.1/bin/npx
W: npm ERR! Remove the existing file and try again, or run npm
W: npm ERR! with --force to overwrite files recklessly.
W: npm ERR! A complete log of this run can be found in:
W: npm ERR! /mnt/cache/npm/_logs/2020-10-13T07_36_03_432Z-debug.log
E: Error building project: Step failed with status code 239.
E: Error: Unable to build application, aborting.
So it looks like
npx is already here, but I can’t seem to be able to use it.
Anyone can help me with that?