Node script runs inside QSH but not when specified on CMD parameter

Issue #68 resolved
Keith Pryke created an issue

Running QSH and manually typing in node /mynodejsdir/helloworld/helloworld.js runs as expected.

Running QSH CMD('node /mynodejsdir/helloworld/helloworld.js') fails with:

qsh: 001-0019 Error found searching for command node. No such path or directory. Press ENTER to end terminal session.

My user id has a .profile file that specifies the PATH environment variable to include the packages bin directory:

PATH=/QOpenSys/pkgs/bin:$PATH
export PATH

What am I missing? The aim is to have these nodejs tasks run in batch / autostart jobs.

Comments (3)

  1. Kevin Adler

    My guess is that when running a non-interactive QSH command it doesn't read the .profile. You can fix by adjusting your command: QSH CMD('source $HOME/.profile; node /mynodejsdir/helloworld/helloworld.js')

  2. Log in to comment