Tag Archives: npm

oracle cloud oci linux & node & theai install

install theai prereqs (as root)

# yum install gcc
# yum install gcc-c++
# yum install nodejs
# npm -g install yarn

build theia

    
$ mkdir mytheia
$ cd mytheia
$ vi package.json 
$ # (C&P from https://theia-ide.org/docs/composing_applications)
$ yarn # will autoinstall everything from your package.json
$ yarn theia build (takes approx 400 seconds)

start theia

$ cd mytheia
$ nohup yarn theia start &

create a SSH tunnel from your local PC to remote OCI

$ ssh -L 3000:localhost:3000 opc@my.oci.vm -N &

open http://localhost:3000

node npm global modules

node npm global modules can be found in /usr/lib/node_modules and /usr/lib/node_modules/npm

install with

# npm -g install dotenv

list with

$ ls /usr/lib/node_modules/
or
$ ls /usr/local/lib/node_modules/
or
$ ls /usr/share/npm/node_modules/

or recursively with

$ npm -g list

to run node with global modules set the NODE_PATH environment variable

$ NODE_PATH=/usr/lib/node_modules/ node myapp.js