ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
190 stars 151 forks source link

Error when installing with yarn #216

Closed neurotech closed 7 years ago

neurotech commented 7 years ago

I receive this error when I try to install ibm_db using yarn (https://yarnpkg.com/):

~/tmp/yarn-ibmdb
> yarn add ibm_db
yarn add v0.17.0
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
[1/1] ⡀ ibm_db: Cached build artifact installer
[-/1] ⡀ waiting...
[-/1] ⡀ waiting...
[-/1] ⡀ waiting...
error An unexpected error occurred: "EACCES: permission denied, open '/Users/neurotech/Library/Caches/Yarn/npm-ibm_db-1.0.1-4c1bc55955118dd4d2812fb3225343afa6892f89/installer/clidriver/bin/._db2cli'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/neurotech/tmp/yarn-ibmdb/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

This is the contents of yarn-error.log:

Arguments: 
  /usr/local/bin/node /usr/local/bin/yarn add ibm_db

PATH: 
  /usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/go/libexec/bin

Yarn version: 
  0.17.0

Node version: 
  6.4.0

Platform: 
  darwin x64

npm manifest: 
  No manifest

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Trace: 
  Error: EACCES: permission denied, open '/Users/neurotech/Library/Caches/Yarn/npm-ibm_db-1.0.1-4c1bc55955118dd4d2812fb3225343afa6892f89/installer/clidriver/bin/._db2cli'
      at Error (native)

Are there any plans to fix this and support installation of ibm_db with yarn?

rhtpandeyIN commented 7 years ago

Hi @neurotech , Could you please tell us how you added ibm_db package name into yarn. I mean is following command working for you? "yarn add ibm_db"

If it is working could you please write down the steps for reproducing the problem. Thanks

neurotech commented 7 years ago

Hi @rhtpandeyIN in my example above, all I did was make a new directory, changed into it, and then ran yarn add ibm_db.

I'm not sure what you mean with regards to this, though:

Could you please tell us how you added ibm_db package name into yarn.

rhtpandeyIN commented 7 years ago

@neurotech , I was just asking for your steps how you tried to install ibm_db. Now it's clear to me.

I followed the same steps and ibm_db installed successfully. I used windows 7 with node version 7.4.0

here is the output of "yarn add ibm_db" command.

E:\NODE_WORK\Yarn>yarn add ibm_db yarn add v0.19.1 info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Saved lockfile. success Saved 44 new dependencies. ├─ balanced-match@0.4.2 ├─ binary@0.3.0 ├─ bindings@1.2.1 ├─ bl@1.2.0 ├─ bluebird@3.4.7 ├─ brace-expansion@1.1.6 ├─ buffer-indexof-polyfill@1.0.1 ├─ buffer-shims@1.0.0 ├─ buffers@0.1.1 ├─ chainsaw@0.1.0 ├─ concat-map@0.0.1 ├─ core-util-is@1.0.2 ├─ duplexer2@0.1.4 ├─ end-of-stream@1.1.0 ├─ fs.realpath@1.0.0 ├─ fstream@1.0.10 ├─ glob@7.1.1 ├─ graceful-fs@4.1.11 ├─ ibm_db@1.0.2 ├─ inflight@1.0.6 ├─ inherits@2.0.3 ├─ isarray@1.0.0 ├─ listenercount@1.0.1 ├─ minimatch@3.0.3 ├─ minimist@0.0.8 ├─ mkdirp@0.5.1 ├─ nan@2.3.5 ├─ once@1.4.0 ├─ path-is-absolute@1.0.1 ├─ process-nextick-args@1.0.7 ├─ pump@1.0.2 ├─ q@1.4.1 ├─ readable-stream@2.1.5 ├─ rimraf@2.5.4 ├─ setimmediate@1.0.5 ├─ string_decoder@0.10.31 ├─ tar-fs@1.15.0 ├─ tar-stream@1.5.2 ├─ targz@1.0.1 ├─ traverse@0.3.9 ├─ unzipper@0.7.6 ├─ util-deprecate@1.0.2 ├─ wrappy@1.0.2 └─ xtend@4.0.1 Done in 13.16s.

rhtpandeyIN commented 7 years ago

As per your error details, it seems you don't have access permissions to a particular directory ( "EACCES: permission denied ). Please try to install it to a different directory or drive where you have write access or try to reinstall "yarn". and following are the simple steps to install "ibm_db" using "yarn" (For windows). 1) Install yarn using yarn msi file. 2) create a new directory. 3) run "yarn add ibm_db" command through command prompt (use with administrative privileges).

neurotech commented 7 years ago

I do have write permissions to the ~/tmp/yarn-ibmdb directory. It's in my home directory.

I can't follow your steps as I am on macOS.

rhtpandeyIN commented 7 years ago

OK let me try with the Mac, I will update you soon.

neurotech commented 7 years ago

It seems to be an issue with yarn: https://github.com/yarnpkg/yarn/pull/1490

rhtpandeyIN commented 7 years ago

I tried on mac too, and its working for me. Following is the output of "yarn add ibm_db" command.

macbook-pro:yarn matpasha$ yarn add ibm_db yarn add v0.19.1 info No lockfile found. [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 📃 Building fresh packages... success Saved lockfile. success Saved 44 new dependencies. ├─ balanced-match@0.4.2 ├─ binary@0.3.0 ├─ bindings@1.2.1 ├─ bl@1.2.0 ├─ bluebird@3.4.7 ├─ brace-expansion@1.1.6 ├─ buffer-indexof-polyfill@1.0.1 ├─ buffer-shims@1.0.0 ├─ buffers@0.1.1 ├─ chainsaw@0.1.0 ├─ concat-map@0.0.1 ├─ core-util-is@1.0.2 ├─ duplexer2@0.1.4 ├─ end-of-stream@1.1.0 ├─ fs.realpath@1.0.0 ├─ fstream@1.0.10 ├─ glob@7.1.1 ├─ graceful-fs@4.1.11 ├─ ibm_db@1.0.2 ├─ inflight@1.0.6 ├─ inherits@2.0.3 ├─ isarray@1.0.0 ├─ listenercount@1.0.1 ├─ minimatch@3.0.3 ├─ minimist@0.0.8 ├─ mkdirp@0.5.1 ├─ nan@2.3.5 ├─ once@1.4.0 ├─ path-is-absolute@1.0.1 ├─ process-nextick-args@1.0.7 ├─ pump@1.0.2 ├─ q@1.4.1 ├─ readable-stream@2.1.5 ├─ rimraf@2.5.4 ├─ setimmediate@1.0.5 ├─ string_decoder@0.10.31 ├─ tar-fs@1.15.0 ├─ tar-stream@1.5.2 ├─ targz@1.0.1 ├─ traverse@0.3.9 ├─ unzipper@0.7.6 ├─ util-deprecate@1.0.2 ├─ wrappy@1.0.2 └─ xtend@4.0.1 ✨ Done in 15.27s.

Could you please try with latest version of yarn, It seems yarn version issue. 0.17.0 is bit old try with 0.19.1

rhtpandeyIN commented 7 years ago

Closing the issue now as it is not the ibm_db issue. :) Thanks :+1: