SoftHSM2と対話するために、graphene-pk11ノードjsモジュールをインストールしようとしています。私は、ノードv4.6.0およびNPMを使用してい2.15.9ノードモジュール 'graphene-pk11'をインストールできない
私は、コマンドNPM install graphene-pk11
を実行すると、私は複数のフォーラムに見上げるとランニングのような解決策/回避策の多くを試してみましたエラーenoent ENOENT: no such file or directory, chmod '/home/lzuniga/development/HsmTest/node_modules/graphene-pk11/build/console/console.js'
を取得npm cache clean
またはnode_modules
フォルダを削除してください。
私も、私は私のapp.jsファイル上で、その後、github's repoからグラフェンのソースをダウンロードしてthis questionにneebzとtheprogrammerの答えで述べたように、それを使用しようとしました(私のプロジェクトフォルダ内node_modules
フォルダを作成し、そこにグラフェンソースフォルダを置きます追加var graphene = require("graphene-pk11");
)、エラーはCannot find module 'graphene-pk11'
npmの問題でなければなりませんが、このモジュールには問題がある可能性があります。 ..
編集 私は私がダウンロードしたグラフェンのプロジェクトディレクトリ内npm install
を実行し、node_modulesディレクトリにコピーした場合、私は次のような出力が得られます。
$ npm install
npm WARN package.json [email protected] No bin file found at ./build/console/console.js
npm WARN deprecated [email protected]: Install [email protected] instead
> [email protected] install /home/lzuniga/development/HsmTest/node_modules/graphene/node_modules/pkcs11js
> node-gyp rebuild
make: Entering directory `/home/lzuniga/development/HsmTest/node_modules/graphene/node_modules/pkcs11js/build'
CXX(target) Release/obj.target/pkcs11/src/main.o
CXX(target) Release/obj.target/pkcs11/src/dl.o
CXX(target) Release/obj.target/pkcs11/src/const.o
CXX(target) Release/obj.target/pkcs11/src/pkcs11/error.o
CXX(target) Release/obj.target/pkcs11/src/pkcs11/v8_convert.o
CXX(target) Release/obj.target/pkcs11/src/pkcs11/template.o
CXX(target) Release/obj.target/pkcs11/src/pkcs11/mech.o
../src/pkcs11/mech.cpp: In member function ‘void Mechanism::Free()’:
../src/pkcs11/mech.cpp:121:15: warning: deleting ‘void*’ is undefined [enabled by default]
CXX(target) Release/obj.target/pkcs11/src/pkcs11/param.o
CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_aes.o
CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_rsa.o
CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_ecdh.o
CXX(target) Release/obj.target/pkcs11/src/pkcs11/pkcs11.o
CXX(target) Release/obj.target/pkcs11/src/async.o
CXX(target) Release/obj.target/pkcs11/src/node.o
SOLINK_MODULE(target) Release/obj.target/pkcs11.node
COPY Release/pkcs11.node
make: Leaving directory `/home/lzuniga/development/HsmTest/node_modules/graphene/node_modules/pkcs11js/build'
npm WARN engine [email protected]: wanted: {"node":">=5"} (current: {"node":"4.6.0","npm":"2.15.9"})
npm WARN engine [email protected]: wanted: {"node":">=5"} (current: {"node":"4.6.0","npm":"2.15.9"})
npm WARN engine [email protected]: wanted: {"node":">=5"} (current: {"node":"4.6.0","npm":"2.15.9"})
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! path /home/lzuniga/development/HsmTest/node_modules/graphene/build/console/console.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/lzuniga/development/HsmTest/node_modules/graphene/build/console/console.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/lzuniga/development/HsmTest/node_modules/graphene/npm-debug.log
'/ path-to-project/node_modules/graphene-pk11/build/console/console.js'というエラーメッセージが表示されますか?あなたのルートに 'path-to-project'というフォルダがなければ、それは失敗するでしょう。おそらく、あなたが使っている実際のコマンドを表示する必要があります。 – Qix
いいえ、混乱を避けるために、実際のパスに変更しました。 – myrmix
このライブラリの作者は、これを見ました。あなたはまだ問題がありますか?もしそうなら、どんな方法でも喜んでレポにバグを報告してください。 – rmhrisk