Issue creating new Angular app SSH- node: No such file or directory

Issue #105 resolved
Gianpiero Fontana created an issue

I have installed angular into pase.
I try create new project Angular

I execute this command

\$ /QOpenSys/pkgs/lib/nodejs12/lib/node_modules/@angular/cli/bin/ng new myapp
node: No such file or directory

Any suggestion
Best Regards

Comments (10)

  1. Mark Irish

    If you run which node in your PuTTY session, do you get any results?

    It looks like your system is unable to find your node binary. There could be a few reasons:

    1. You don’t have node installed. You will need to run yum install nodejs12 . This doesn’t seem to be the case, because your 5250 session shows Node.js version 12.14.0 and you are referencing /QOpenSys/pkgs/lib/nodejs12, which would only exist if you have the right software.
    2. You have Node.js installed, but you haven’t updated your PATH to point to /QOpenSys/pkgs/bin where open-source software is delivered on the system. See the docs here: https://bitbucket.org/ibmi/opensource/src/master/docs/yum/#markdown-header-adjusting-your-path

    It is probably option 2. If that doesn’t solve the issue, let me know and we can dig deeper.

  2. Gianpiero Fontana reporter

    I have setup update path.

    The strange thing is that in qp2term it gives me the version of angular installed but in ssh it doesn't seem to find the path of node.

  3. Kevin Adler

    In SSH, the default shell is bsh (which is older and less featured) while QP2TERM uses ksh. My guess is that you do not need to export PATH in ksh, while in bsh you do which is causing the difference. You can use QSYS2.SET_PASE_SHELL_INFO to set the default shell for SSH to be ksh (or even better, bash).

  4. Gianpiero Fontana reporter
    Yes I was wrong. I kept writing "export path" 
    instead of "export PATH" Sorry for the inconvenience
    Thank you
    

  5. Log in to comment