Forum Stats

  • 3,837,795 Users
  • 2,262,300 Discussions
  • 7,900,394 Comments

Discussions

Unable to install ojet on oracle free tier vm

HrishikeshJ
HrishikeshJ Member Posts: 299 Silver Badge
edited Aug 10, 2021 8:08PM in Oracle JET

Have installed node, and it is working perfectly fine (have setup ingress rule etc)

# node --version

v6.17.1

then using following command, i am installing ojet

# npm install -g @oracle/ojet-cli

/usr/bin/ojet -> /usr/lib/node_modules/@oracle/ojet-cli/bin/ojet

/usr/lib

└─┬ @oracle/[email protected]

 ├─┬ @oracle/[email protected]

...

 ├── [email protected]1.2.5

 └── [email protected]


However, i get an error on executing the command below:

# ojet help

: No such file or directory

# which ojet

/bin/ojet

ls -ltr /bin/ojet

lrwxrwxrwx. 1 root root 45 Aug 10 19:00 /bin/ojet -> ../lib/node_modules/@oracle/ojet-cli/bin/ojet


but ../lib/node_modules/@oracle/ojet-cli/bin/ojet is empty.

Please help on how to install it correctly.

Thanks,

Hrishi

Tagged:

Best Answers

Answers

  • John 'JB' Brock-Oracle
    John 'JB' Brock-Oracle Posts: 2,810 Employee
    Answer ✓

    JET requires Node.js v12 or higher. Node v6 is extremely old and something I would not be using because of known security issues over the years.

    Please update that Nodejs version and give it another try.

  • Since this is a Linux OS, you will need to use sudo when you try to install the ojet cli as a global npm package a well.

    sudo npm i -g @oracle/ojet-cli

  • HrishikeshJ
    HrishikeshJ Member Posts: 299 Silver Badge

    Thanks a lot JB for the response.

    looks like there was some issue w.r.t. vm. i recreated a new VM. using sudo su ..performed yum update.

    Installed:

     kernel-uek.x86_64 0:5.4.17-2102.204.4.2.el7uek               kernel-uek-devel.x86_64 0:5.4.17-2102.204.4.2.el7uek


    Updated:

     cloud-init.x86_64 0:19.4-7.0.3.el7_9.5      microcode_ctl.x86_64 2:2.1-73.11.0.1.el7_9      nfs-utils.x86_64 1:1.3.0-0.68.0.1.el7.1

     python36-oci-cli.noarch 0:3.0.0-1.el7       python36-oci-sdk.x86_64 0:2.43.2-1.el7        uptrack.noarch 0:1.2.75-0.el7


    Complete!

    [[email protected] opc]# sudo firewall-cmd --permanent --add-port=3000/tcp

    success

    [[email protected] opc]# sudo firewall-cmd --permanent --add-port=8000/tcp

    success

    [[email protected] opc]# sudo firewall-cmd --reload

    success


    However, while installing node; now i am getting error as :

    # sudo yum install -y nodejs

    Loaded plugins: langpacks, ulninfo

    No package nodejs available.

    Error: Nothing to do


    looks like nodejs installation itself is having trouble.

    is it a problem with Oracle free tier image? could this be data center specific problem? ( i am working on mumbai OCI region)

    Thanks,

    Hrishi

  • John 'JB' Brock-Oracle
    John 'JB' Brock-Oracle Posts: 2,810 Employee
    Answer ✓

    Hi Hrishi,

    I went into my own free tier account and setup a VM to see how it could be done.

    I followed this page for getting the latest Nodejs install working. Node.js Packages for Oracle Linux | Integrated Cloud. Applications & Platform Services.

    Then I used this page Free Tier: Install Node Express on an Oracle Linux Instance to setup the VM access (Ingress) and turning on the firewall for the VM itself. I didn't bother doing the full Express application set, since JET actually uses Express when you do the ojet serve command.

    The one thing that I did change in all of the above, was instead of using port 3000, I setup port 8000. By doing this, I can now run the CLI command

    ojet serve --server-only --no-livereload

    and then hit the public IP address for my VM to see the JET app running.