After installing the nodeJs and ojet-cli, I tried to scaffold a web application using the OJET CLI. I issued the ojet command as root. Here's what the output looks like :
[root@saasbi ojet_apps]# ojet create myFirstWebApp --template=blank:web
Processing template: blank:web
Your app structure is generated. Continuing with library install.
Performing npm install may take a bit.
Invoking npm install.
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
> phantomjs-prebuilt@2.1.16 install /ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt
> node install.js
Considering PhantomJS found at /usr/local/lib/nodejs/node-v8.11.3/bin/phantomjs
Looks like an `npm install -g`
Found PhantomJS at /usr/local/lib/nodejs/node-v8.11.3/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ...verifying
Writing location.js file
Error checking path, continuing { Error: EACCES: permission denied, open '/ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt/lib/location.js'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.writeFileSync (fs.js:1299:33)
at writeLocationFile (/ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt/lib/util.js:84:6)
at Promise._successFn (/ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt/install.js:366:11)
at nextTickCallback (/ojet_apps/myFirstWebApp/node_modules/kew/kew.js:47:28)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt/lib/location.js' }
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1529636869355/phantomjs-2.1.1-linux-x86_64 -> /ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1529636869355/phantomjs-2.1.1-linux-x86_64' -> '/ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt/lib/phantom'
errno: -13,
code: 'EACCES',
syscall: 'link',
path: '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1529636869355/phantomjs-2.1.1-linux-x86_64',
dest: '/ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1529636869355/phantomjs-2.1.1-linux-x86_64' -> '/ojet_apps/myFirstWebApp/node_modules/phantomjs-prebuilt/lib/phantom'
npm WARN qunit-reporter-junit@1.1.1 requires a peer of qunitjs@* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-22T03_07_52_062Z-debug.log
Error: (during Invoking npm install.) 1
Attaching the 2018-06-22T03_07_52_062Z-debug.log
Not sure what to do here. Any suggestions?