Sails Waterline Oracle - installing sails-oracle-database - Error regarding oci/version - sails.js

I'm a Grails (with Oracle) developer who is experimenting with Sails.js
I'm having an issue in installing the waterline oracle adapter. Steps I can do to duplicate, with a standalone node app, using Mac OS:
Following instructions on https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx
I placed the Oracle basic client files in my ~/lib folder by using: cp instantclient_12_2/{libclntsh.dylib.12.1,libclntshcore.dylib.12.1,libons.dylib,libnnz12.dylib,libociei.dylib} ~/lib/
In my node app, I can then install the oracle add-on by running: npm install oracledb
I can then run the examples they provide, such as by doing "node select1.js" and it successfully connects to the database and runs fine, etc
I then try to install the waterline oracle adapter by doing: npm install sails-oracle-database
It gives this error:
>oracledb#1.13.1 install /Users/myuser/Documents/node/oracle/node_modules/sails-oracle-database/node_modules/oracledb
>node-gyp rebuild
node-oracledb ERR! Error: Cannot find /opt/oracle/instantclient/libclntsh.dylib
node-oracledb ERR! Error: Do you need to run 'cd /opt/oracle/instantclient && ln -s libclntsh.dylib.* libclntsh.dylib'?
node-oracledb ERR! Error: See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx
gyp: Call to 'INSTURL="https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx"; ERR="node-oracledb ERR! Error:"; if [ -z $OCI_LIB_DIR ]; then if [ -f /opt/oracle/instantclient/libclntsh.dylib ]; then echo "/opt/oracle/instantclient/"; else echo "$ERR Cannot find /opt/oracle/instantclient/libclntsh.dylib" >&2; echo "$ERR Do you need to run 'cd /opt/oracle/instantclient && ln -s libclntsh.dylib.* libclntsh.dylib'?" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; else if [ -f "$OCI_LIB_DIR/libclntsh.dylib" ]; then echo $OCI_LIB_DIR; else echo "$ERR Cannot find \$OCI_LIB_DIR/libclntsh.dylib" >&2; echo "$ERR Do you need to run 'cd \$OCI_LIB_DIR && ln -s libclntsh.dylib.* libclntsh.dylib'?" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; fi;' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
Trying to make sense of the error... It looks like it wants me to set env variables such as: OCI_LIB_DIR
However, the instructions on the oracle page it references say that is no longer necessary withe oracle-node 2 version. Is it possible the waterline-oracle adapter isn't yet compatible with this version?

You'll also need the SDK package of the oracle instant client. If your instant client directory already has a "sdk" folder then you're set. Next is to copy it to your "/opt/oracle/instantclient" directory.
➜ instantclient pwd
/opt/oracle/instantclient
➜ instantclient ls
BASIC_README glogin.sql libnnz12.dylib libocijdbc12.dylib libsqlplusic.dylib uidrvci
SQLPLUS_README libclntsh.dylib libocci.dylib libons.dylib ojdbc8.jar xstreams.jar
adrci libclntsh.dylib.12.1 libocci.dylib.12.1 liboramysql12.dylib sdk
genezi libclntshcore.dylib.12.1 libociei.dylib libsqlplus.dylib sqlplus

Related

yarn kbn bootstrap failed while trying to prepare kibana dev env

I am trying to generate the Kibana plugin and for that I already downloaded the .zip file from the github.
However while preparing for the Kibana development environment, I got an error as mentioned below from yarn kbn bootstrap cmd:
ERROR UNHANDLED ERROR
ERROR Error: Command failed with exit code 128: git merge-base HEAD FETCH_HEAD fatal: Not a valid object name HEAD
Note:
I already sudo git init
Steps followed so far
sudo wget https://github.com/elastic/kibana/archive/refs/tags/v7.17.0.zip
sudo apt-get install unzip
sudo unzip v7.17.0.zip
sudo mv kibana-v7.17.0 kibana
sudo chmod -R 777 kibana-7.17.0
sudo yarn add require-in-the-middle
sudo yarn add symbol-observable
sudo yarn add source-map-support
sudo yarn add lodash
sudo git init
sudo yarn kbn bootstrap -- failed
ERROR UNHANDLED ERROR
ERROR Error: Command failed with exit code 128: git merge-base HEAD FETCH_HEAD
fatal: Not a valid object name HEAD

Not able to use npm cli in a github workflows

I want to use a npm cli utility (this one), inside a bash script and to run it via a github workflow.
This is my basic script:
folder="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
mkdir -p "$folder"/rawdata
mkdir -p "$folder"/processing
npm list -g --depth=0
rm "$folder"/rawdata/"$reg".png
capture-website --delay 5 --full-page --width 1280 --height 720 --output "$folder"/rawdata/"$reg".png "https://ondata.github.io/vaccinipertutti/?area=SIC"
I run it using this github workflow (it's Ubuntu 20.04.2 LTS), in which I set capture-website-cli installation in this way:
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
source ~/.profile
NPM_CONFIG_PREFIX=~/.npm-global
npm install -g capture-website
But when the script runs I have this error:
./test.sh: line 13: capture-website: command not found
It seems that it has been not installed in ~/.npm-global.
If I run find /home/runner -executable -name capture-website I have
/home/runner/.npm-global/lib/node_modules/capture-website
Do you have some advice to solve my problem?
You might need to differentiate between:
capture-website
sindresorhus/capture-website-cli which provide a CLI (commannd-line interface) way to use that npm library (library means: no executable in .npm-global/bin)
You need to install the latter in your runner $PATH.
npm install --global capture-website-cli

Ionic Appflow build fails with "Permission denied"

I am trying to build my project on Ionic Appflow, but it keeps failing with the following. I do not understand what could be wrong as I can locally generate and build locally.
Has anybody else experienced such issues?
sh: 1: ng: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! aardraapp#0.0.1 build: `ng build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the aardraapp#0.0.1 build 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/2019-04-24T20_45_42_679Z-debug.log
+------+---------------------+-------------+
| fastlane summary |
+------+---------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------+-------------+
| 1 | default_platform | 0 |
| 2 | build_summary | 2 |
| 3 | add_git_credentials | 0 |
| 4 | modify_config_xml | 0 |
| 💥 | build_pro_app | 17 |
+------+---------------------+-------------+
[20:45:42]: fastlane finished with errors
/usr/local/bin/fastlane: [!] Exit status of command 'npm run build' was 126 instead of 0.
(FastlaneCore::Interface::FastlaneShellError)
> aardraapp#0.0.1 build /builds/aardrasystems/app
> ng build
sh: 1: ng: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! aardraapp#0.0.1 build: `ng build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the aardraapp#0.0.1 build 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/2019-04-24T20_45_42_679Z-debug.log
Running after script...
$ run "clean-up"
ERROR: Job failed: command terminated with exit code 1
If you did the project in Windows, it is possible that it is a permission error on the generated files. Why AppFlow uses a Unix OS for Android.
You have to give it permissions through GIT:
https://ionic.zendesk.com/hc/en-us/articles/360000160067-Adding-execute-permissions-using-git

'cap production setup' & 'cap production deploy' doesn't execute

I've set up all of things for deploy ruby on rails by capistrano on ubuntu server 14.10
but when i execute command by cap production setup or deploy
i've got this error message so i found out path by .rbenv/bin/rbenv but there wasn't
how can i solve this problem
following is what i got error message
thank you
**DEBUG [2814493d] Finished in 3.501 seconds with exit status 0 (successful).
DEBUG [3f8ba0c4] Running /usr/bin/env [ -d ~/.rbenv/plugins/ruby-build ] as
deployer#railserver.cloudapp.net
DEBUG [3f8ba0c4] Command: [ -d ~/.rbenv/plugins/ruby-build ]
DEBUG [3f8ba0c4] Finished in 0.012 seconds with exit status 0 (successful).
DEBUG [243e2a34] Running /usr/bin/env [ -d ~/.rbenv/versions/2.1.2 ] as
deployer#railserver.cloudapp.net
DEBUG [243e2a34] Command: [ -d ~/.rbenv/versions/2.1.2 ]
DEBUG [243e2a34] Finished in 0.009 seconds with exit status 0 (successful).
DEBUG [7a6e00da] Running RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.2 ~/.rbenv/bin/rbenv exec gem query
--quiet --installed --name-matches ^bundler$ as deployer#railserver.cloudapp.net
DEBUG [7a6e00da] Command: ( PATH=~/.rbenv/shims:~/.rbenv/bin:$PATH RBENV_ROOT=~/.rbenv
RBENV_VERSION=2.1.2 RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.2 ~/.rbenv/bin/rbenv exec gem query
--quiet --installed --name-matches ^bundler$ )
DEBUG [7a6e00da] bash: /home/deployer/.rbenv/bin/rbenv: No such file or directory
DEBUG [7a6e00da] Finished in 0.009 seconds with exit status 127 (failed).
INFO [d6c3086f] Running RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.2 ~/.rbenv/bin/rbenv exec gem install
bundler --quiet --no-rdoc --no-ri as deployer#railserver.cloudapp.net
DEBUG [d6c3086f] Command: ( PATH=~/.rbenv/shims:~/.rbenv/bin:$PATH RBENV_ROOT=~/.rbenv
RBENV_VERSION=2.1.2 RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.2 ~/.rbenv/bin/rbenv exec gem install
bundler --quiet --no-rdoc --no-ri )
DEBUG [d6c3086f] bash: /home/deployer/.rbenv/bin/rbenv: No such file or directory
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deployer#railserver.cloudapp.net: gem
exit status: 127
gem stdout: Nothing written
gem stderr: bash: /home/deployer/.rbenv/bin/rbenv: No such file or directory
SSHKit::Command::Failed: gem exit status: 127
gem stdout: Nothing written
gem stderr: bash: /home/deployer/.rbenv/bin/rbenv: No such file or directory
Tasks: TOP => rbenv:install_bundler
(See full trace by running task with --trace)
deployer#railserver:~/rubyonrailstest$ cap aborted!
Stage not set, please call something such as `cap production deploy`, where production is a stage
you have defined.**
I'd recommend capistrano-rbenv-install plugin. It makes problems like the one you have disappear.

Capistrano RBENV path production error: failed: "env PATH=/home/user_with_rbenv/.rben

I have 2 SSH users. 1 which have rbenv installed.
I have watched the railscast about deploying to a VPS and some users have solved the problem with added the rbenv path.
set :default_environment, {
'PATH' => "/home/user_with_rbenv/.rbenv/shims:/home/user_with_rbenv/.rbenv/bin:$PATH"
}
I am deploying from the user that does not have .rbenv included in its /home/user folder.
I get the following error:
←[2;37mcommand finished in 117ms←[0m
failed: "env PATH=/home/user_with_rbenv/.rbenv/shims:/home/user_with_rbenv/.rbenv/bin:$PATH sh -
c 'cd -- /var/www/user_with_rbenv/releases/20130215102746 && bundle exec rake RAILS_ENV=
production RAILS_GROUPS=assets assets:precompile && cp -- /var/www/app/share
d/assets/manifest.yml /var/www/app/releases/20130215102746/assets_manifest.y
/home/user_with_rbenv/.rbenv is the absolute path to the rbenv
And path is:
$ $PATH
-sh: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: not found