2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

node-svmのインストールで手間取ったのでメモ

Last updated at Posted at 2017-08-23
sudo npm install -g node-svm  

これがひたすらエラー

npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/local/bin/node-svm -> /usr/local/lib/node_modules/node-svm/bin/node-svm

> node-svm@2.1.8 install /usr/local/lib/node_modules/node-svm
> node-gyp rebuild
gyp ERR! clean error 
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/node-svm
gyp ERR! node -v v7.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-svm@2.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-svm@2.1.8 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!     /Users/XXXXXXXX/.npm/_logs/2017-08-20T16_00_14_808Z-debug.log

npm自体を更新したりしたけど、最後はこれで通った・・・ようです。

sudo npm install -g --unsafe-perm node-svm

正直、unsafe-permの説明、全然意味がわからん・・・

npm-config

#####追記

上記のインストールでコマンドからnode-svmを打てるようにはなったけど、jsファイルからrequireで呼び出そうとするとエラーになった。

Error: Cannot find module 'node-svm'

で、node-svmのgithubのread.meの方法でインストールしたらrequireで呼び出せるようになった。

npm install --save node-svm

githubのnode-svmのページ
node-svm

あれ?て事は最初からそうすれば良かったのか?でももう分からんしな・・・
なんにせよ、以上でコマンドからもjsファイルからでもnode-svmを呼び出せるようになりました。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?