JavaScript

Node.js

Node.js

 View Only
Expand all | Collapse all

NPM does not install with Node.js

  • 1.  NPM does not install with Node.js

    Posted Wed September 29, 2021 12:08 PM
    i tried installing  the 2 latest releases of Node.js and npm does not install. I do not have Make 4.1 or Python 2.7 installed. are they required or 'optional' as indicated in the setup.sh script?


    ------------------------------
    EILEEN BARKOW
    ------------------------------


  • 2.  RE: NPM does not install with Node.js

    Posted Wed September 29, 2021 03:01 PM
    Hi Eileen,

    Can you show us the output of npm --version when run manually?

    ------------------------------
    Igor Todorovski
    ------------------------------



  • 3.  RE: NPM does not install with Node.js

    Posted Wed September 29, 2021 04:28 PM

    I  cannot find an executable npm module in the installed files. I am installing Make 4.3 to see if it helps.

     

     






  • 4.  RE: NPM does not install with Node.js

    Posted Thu September 30, 2021 12:10 PM

    i installed make 4.3 which the script found, but still do not get a executable npm module (like there is on windows npm.exe). the generated npm directly has npm as a link to the .js file.

    lrwxrwxrwx   1 ACSCEXB  CIXGR1        38 Sep 29 10:53 npm -> ../lib/node_modules

    /npm/bin/npm-cli.js

    $

     

    Setting up IBM SDK for Node.js - z/OS 14.0

    Checking for supported platform...SUCCESS

    Checking for supported hardware...SUCCESS

    Checking for supported OS version...SUCCESS

    Checking that /u/eileen/nodejs/usr/bin/env exists...SUCCESS

    Checking that Python 2.7+ exists...FAILED

    ***WARNING: Python is not present on your system. It is an optional requirement

    if you are planning to install native Node.js add-ons (e.g. vsam.js, zcrypto, ra

    cf, zrexx)

    Checking that Make 4.1+ exists...SUCCESS

    Checking that system prerequisite PTFs are installed (CHECK 1)...SUCCESS

    Checking that system prerequisite PTFs are installed (CHECK 1)...SUCCESS

    Checking that system prerequisite PTFs are installed (CHECK 2)...SUCCESS

    Checking that system prerequisite PTFs are installed (CHECK 3)...SUCCESS

    Checking that Integrated Cryptographic Service Facility is active...SUCCESS

    Checking for sufficient above the bar memory...Ý: ./setup.sh 199: FSUM6807 expre

    ssion syntax error

    SUCCESS

    Checking for sufficient disk space to install njsc C/C++ compiler...FAILED

    ***WARNING: You do not have enough free space to install the Node.js C/C++ compi

    ler. 1GB free space is required, found only 512200KB.

    Performing Node.js sanity test...SUCCESS

    Performing npm sanity test...FAILED

    ***ERROR: npm sanity test ("npm --version") returned invalid result. Refer to th

    e instructions in README.txt and try again.

     

    Setup completed with 1 error(s)

    -------------------------------

    There was a problem running the setup script. Review the README.txt.

    $

    $

     




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.





  • 5.  RE: NPM does not install with Node.js

    Posted Thu September 30, 2021 12:23 PM

    I just noticed the express syntax error on line 199 checking for MEMORY, but the check was bypassed. I  will check the MEMORY available

     

    0001 print -n "Checking for sufficient above the bar memory..."

    if [ ${#MEMORY} -lt 5 -a ${MEMORY} -lt 2048 ]; then

      echo "FAILED"

      echo "***WARNING: You need at least 2GB of above the bar memory to run Node.js on z/OS, found only ${MEMORY}MB."

     

     






  • 6.  RE: NPM does not install with Node.js

    Posted Thu September 30, 2021 03:20 PM
    npm should be in the $INSTALL_DIR/bin directory, where INSTALL_DIR is your node.js install dir.

    If you set your PATH to export PATH=$INSTALL_DIR/bin:$PATH and run npm, what do you get?

    Also, the message "Checking that /u/eileen/nodejs/usr/bin/env exists...SUCCESS" is not expected.  It should be checking for /usr/bin/env.  Does that exist on your filesystem?  npm requires /usr/bin/env

    ------------------------------
    Igor Todorovski
    ------------------------------



  • 7.  RE: NPM does not install with Node.js

    Posted Fri October 01, 2021 09:58 AM

     

    i cannot create /usr/bin/env - it is a read only file system so i changed the LINKFILE/DEFAULT-ENV parms to use /u/eileen/nodejs/usr/bin/env.

    the available MEMORY from ulimit is $ ulimit -M

    1048576

    but nodejs --version still works.

    *********************************

    npm --version

    runs env command in /bin directory then shows:

    npm 2: FSUM7332 syntax error: got (), expecting Word

    $

    **********************************************

    npm is a link to npm-cli.js.  it is not an executable module.

     

    /u/eileen/nodejs/node-v14.17.2-os390-s390x-202108041707/bin

    $ ls -l

    total 1232

    -rwxrwxrwx   1 ACSCEXB  CIXGR1    622592 Aug  4 18:34 node

    lrwxrwxrwx   1 ACSCEXB  CIXGR1        61 Sep 29 10:53 node-gyp -> ../lib/node_mo

    dules/npm/node_modules/node-gyp/bin/node-gyp.js

    lrwxrwxrwx   1 ACSCEXB  CIXGR1        38 Sep 29 10:53 npm -> ../lib/node_modules

    /npm/bin/npm-cli.js

    lrwxrwxrwx   1 ACSCEXB  CIXGR1        38 Sep 29 10:53 npx -> ../lib/node_modules

    /npm/bin/npx-cli.js

     




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.





  • 8.  RE: NPM does not install with Node.js

    Posted Fri October 01, 2021 11:05 AM

    I found the npm module in /u/eileen/nodejs/node-v14.17.2-os390-s390x-202108041707/lib/node_modules/npm/bin

    Ignore my last response.

     

                           Thanks Igor

     




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.





  • 9.  RE: NPM does not install with Node.js

    Posted Mon October 04, 2021 09:23 AM

    we have a read only /usr/bin directory so npm did not install correctly.

    We are going to mount a writable directory and reinstall the product, which hopefully will correct the problem.

    I will let you know the outcome.

     

    Thank you Igor and others who responded.

     

     






  • 10.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 10:03 AM

     

    Hi everyone,

    I am sorry to be a pest about this but i still cannot get npm to install correctly.

    npm --version returns

    npm 2: FSUM7332 syntax error: got (), expecting Word

     

    but when i go to bin directory containing npm and run

    node npm --version  i get a valid result.

    $ ls

    node      node-gyp  npm       npx

    $ node npm --version

    6.14.13

    but npm --version still returns:

    npm 2: FSUM7332 syntax error: got (), expecting Word

    $

    **********from setup.sh*******************

    Setting up IBM SDK for Node.js - z/OS 14.0

    Checking for supported platform...SUCCESS

    Checking for supported hardware...SUCCESS

    Checking for supported OS version...SUCCESS

    Checking that /usr/bin/env exists...SUCCESS

    Checking that Python 2.7+ exists...FAILED

    ***WARNING: Python is not present on your system. It is an optional requirement

    if you are planning to install native Node.js add-ons (e.g. vsam.js, zcrypto, ra

    cf, zrexx)

    Checking that Make 4.1+ exists...SUCCESS

    Checking that system prerequisite PTFs are installed (CHECK 1)...SUCCESS

    Checking that system prerequisite PTFs are installed (CHECK 2)...SUCCESS

    Checking that system prerequisite PTFs are installed (CHECK 3)...SUCCESS

    Checking that Integrated Cryptographic Service Facility is active...SUCCESS

    Checking for sufficient above the bar memory...Ý: ./setup.sh 199: FSUM6807 expre

    ssion syntax error

    SUCCESS

    Checking for sufficient disk space to install njsc C/C++ compiler...FAILED

    ***WARNING: You do not have enough free space to install the Node.js C/C++ compi

    ler. 1GB free space is required, found only 37336KB.

    Performing Node.js sanity test...SUCCESS

    Performing npm sanity test...FAILED

    ***ERROR: npm sanity test ("npm --version") returned invalid result. Refer to th

    e instructions in README.txt and try again.

     

    Setup completed with 1 error(s)

    -------------------------------

    There was a problem running the setup script. Review the README.txt.

    $

     




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.





  • 11.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 10:23 AM
    npm has #!/usr/bin/env node at the top of the file, which appears to be failing for you.

    Can you run /usr/bin/env node manually on the terminal to confirm.   The node.js prompt should appear.  /usr/bin/env searches the PATH environment variable for the argument, in this case node, and then executes it.

    This is how /usr/bin/env looks on our system:
    ls -l /usr/bin/env
    lrwxrwxrwx 1 USER USER 8 Oct 26 2017 /usr/bin/env -> /bin/env

    ------------------------------
    Igor Todorovski
    ------------------------------



  • 12.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 11:49 AM

    /usr/bin/env: FSUM9209 cannot execute: reason code = 0b1b011f: EDC5111I Permissi

    on denied.

    MVSZ /usr/bin #>

     

    I think that the link is not getting created but all permissions are set and I even ran setup.sh in su mode. And the z/os system programmer also tried it and re created the env directory and I ran setup.sh again but got the same result.

     

     

    drwxrwxrwx   2 ACSCEXS  OMVSGRP        0 Oct  5 11:36 env

    MVSZ /usr/bin #>

     

    But:

    MVSZ /usr/bin #> ls -l /usr/bin/env

    total 0

    MVSZ /usr/bin #>

     

    I do not understand the use of env.   env is a shell command and the script executes it every time it sees /usr/bin/env




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.





  • 13.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 12:00 PM

    My PATH setting was messed up in my last note – I was changing the profile.

    But now node is in the path but get the same thing;

     

    $ /usr/bin/env node

    /usr/bin/env: FSUM9209 cannot execute: reason code = 0b1b011f: EDC5111I Permissi

    on denied.

    $

     

    $ node --version

    v14.17.2

    $

     

    $ ls -l /usr/bin/

    total 0

    drwxrwxrwx   2 ACSCEXS  OMVSGRP        0 Oct  5 11:36 env

     

    $ ls -l /usr/bin/env

    total 0

     

     

    $




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.





  • 14.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 01:27 PM

     

    I created the symlink:

    ls -l /usr/bin/env

    total 0

    lrwxrwxrwx   1 ACSCEXB  OMVSGRP        8 Oct  5 13:16 env -> /bin/env

     

    still get:

    $ /usr/bin/env node

    /usr/bin/env: FSUM9209 cannot execute: reason code = 0b1b011f: EDC5111I Permissi

    on denied.

    $

    In nodedir/bin directory:

     

    npm –version là

    npm 2: FSUM7332 syntax error: got (), expecting Word

     

    maybe something is getting mixed up with the /bin/env shell command:

    $ ls -l /bin/env

    -rwxr-xr-x   2 BPXROOT  OMVSGRP    94208 Oct  2  2020 /bin/env

     

    $ node npm --version

    6.14.13

    $






  • 15.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 01:50 PM
    It seems as though you cannot execute /usr/bin/env.

    Let's check the target /bin/env.
    Is /bin/env accessible?

    Try /bin/env node

    This is how /bin/env looks on our system:
    ls -l /bin/env
    -rwxr-xr-x 2 USER USER 90112 Apr 27 2017 /bin/env


    ------------------------------
    Igor Todorovski
    ------------------------------



  • 16.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 01:54 PM
    Also, how did you create the symlink?

    We use ln -s /bin/env /usr/bin/env

    ------------------------------
    Igor Todorovski
    ------------------------------



  • 17.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 02:13 PM

    I created the symlink with ls -s /bin/env /usr/bin/env

     

    ls -l /usr/bin/env

    total 0

    lrwxrwxrwx   1 ACSCEXB  OMVSGRP        8 Oct  5 13:16 env -> /bin/env

     

    I changed the path to put /bin directory last in the path but it did not help.

    There already is a /bin directory that contains the env command. Could this be messing things up?

     

    I could probably use the node npm --...   commands for what I have to do to install the sample CICS node.js application.

    Node npm –version and node npm –help work.   I have to use –install and –start.

     

    This is my current path:

    /u/eileen/nodejs/make43/ibm-make-v4.3.0/bin:.:/usr/lpp/java/J8.0_64/bin:/u/eilee

    n:/u/eileen/nodejs/nodedir/bin:/bin




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.





  • 18.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 02:24 PM

    Sorry I missed this:

     

    This works:

     

    $ /bin/env node   

    Welcome to Node.js v14.17.2.

    Type ".help" for more information.

    > 

     

    But  this does not:

     

    $ /usr/bin/env node

    /usr/bin/env: FSUM9209 cannot execute: reason code = 0b1b011f: EDC5111I Permissi

    on denied.

    $




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.





  • 19.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 02:59 PM
    Ok, that's good, so the problem lies with /usr/bin/env.

    Are you able to remove /usr/bin/env and recreate the symbolic link?   /usr/bin/env does not appear to be a symbolic link.
    rm /usr/bin/env # if it's a dir, use rm -rf /usr/bin/env
    ln -s /bin/env /usr/bin/env


    ------------------------------
    Igor Todorovski
    ------------------------------



  • 20.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 03:16 PM

    It is a link now – I created it several emails ago:

    I still think that the problem is with the /bin/env module that comes with the system.

    It keeps executing everytime the script containing /usr/bin/env is run.  Do you have one on your system?

     

    $ ls -l /usr/bin/env

    total 0

    lrwxrwxrwx   1 ACSCEXB  OMVSGRP        8 Oct  5 13:16 env -> /bin/env

    $

     




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.





  • 21.  RE: NPM does not install with Node.js

    Posted Tue October 05, 2021 03:31 PM

    I recreated the link (which I was sure had been created correctly several steps ago) but now:

     

    $ pwd

    /usr

    $ npm --version

    6.14.13

    $

     

    IT WORKS!!! Thank you so much Igor.

     

    I still do not understand what was wrong after I created the link the last time.

    But your commands worked better than mine.

     

                        Thank again!




    This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.