Thanks Steve and Scott for your suggestions. They helped me figure out the
I added the ./server but it still didn't find it. Then I recalled that the
serve module had been installed globally.
So I changed to
/QOpenSys/pkgs/lib/nodejs10/bin/serve -s build -l 8010
and the command is found.

Thanks for the help.


On Thu, Feb 27, 2020 at 10:34 AM Scott Klement <opensource@xxxxxxxxxxxxxxxx>

Hi Rob,

QShell (like all Unix shells) searches in your PATH to find the program
to run. It is looking for a program named 'serve', but cannot find it
in your PATH. You haven't told us what the PATH is... I suspect its
different in the batch job vs. the interactive one.

If the goal is to run the 'serve' command from the
/home/RROGERSON/node/vlegacireactjs directory, then you should change
the code to this:

./serve -s build -l 8010

The ./ tells it to look in the current directory (i.e. the one you
switched to with the prior 'cd' command) rather than use the PATH to
find the program.

Good luck!


On 2/26/2020 7:03 PM, Robert Rogerson wrote:
I'm on the IBM i v7r3

When I run a command/program interactively in Qshell it runs
But when I try to run this in it fails with Command serve not

I start an interactive Qshell session.

$ cd node/vlegacireactjs
$ serve -s build -l 8010

The above starts a react server which I confirm is reachable when I point
my browser at port 8010. I am trying to run a program that will start the
server in batch.

SBMJOB CMD(QSH CMD('/home/RROGERSON/node/vlegacireactjs/')) +

And then contains

cd /home/RROGERSON/node/vlegacireactjs
serve -s build -l 8010

The job NODE_REACT fails (as seen in the QPRINT spool file) with Command
serve not found .

Does anyone know what I have to add to to get this to run?


This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives

Help support by shopping at with our affiliate

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.