2016-08-17 3 views
0

何らかの理由で、シリアルポートモジュールを手動でコンピュータにインストールしようとしています。私はgithubファイルをコピーして、それをローミングフォルダに貼り付けようとしましたが、次の問題に遭遇しました。NodeJSにグローバルモジュールを手動でインストールする方法

└─┬ [email protected] 
    ├── UNMET DEPENDENCY [email protected] 
    ├── UNMET DEPENDENCY [email protected]^2.9.0 
    ├── UNMET DEPENDENCY [email protected]^2.1.1 
    ├── UNMET DEPENDENCY [email protected]^3.1.0 
    ├── UNMET DEPENDENCY [email protected]^2.3.5 
    ├── UNMET DEPENDENCY [email protected]^0.6.26 
    └── UNMET DEPENDENCY [email protected]^4.0.3 

npm ERR! missing: [email protected], required by [email protected] 
npm ERR! missing: [email protected]^2.9.0, required by [email protected] 
npm ERR! missing: [email protected]^2.1.1, required by [email protected] 
npm ERR! missing: [email protected]^3.1.0, required by [email protected] 
npm ERR! missing: [email protected]^2.3.5, required by [email protected] 
npm ERR! missing: [email protected]^0.6.26, required by [email protected] 
npm ERR! missing: [email protected]^4.0.3, required by [email protected] 

windowsコマンドプロンプトからserialport-listを実行しようとしています。シリアルポートの理由。

私は通常、通常の方法をSERIALPORTしようとしたとき、私は次のようなエラーに遭遇:

vcbuild.exe : error VCBLD0010: Project 'C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport\build\serialport. 
vcproj' requires upgrade. Use 'vcbuild /upgrade' or 'devenv /upgrade' to upgrade the project. [C:\Users\Jonathan\AppDat 
a\Roaming\npm\node_modules\serialport\build\binding.sln] 

私がすることができます。ファイルが存在しないので、代わりに私はSERIALPORTを手動でダウンロードしているので、tはアップグレードを適用します。 vcprojファイルを作成してアップグレードを適用した後、シリアルポートノードモジュールをコピーしましたが、コマンドプロンプトからserialport-listを実行することはできません。

UPDATE

C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport>vcbuild /upgrade C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport\build\serialport.vcproj 
Microsoft (R) Visual C++ Project Builder - Command Line Version 9.00.30729 
Copyright (C) Microsoft Corporation. All rights reserved. 

Successfully upgraded project file 'C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport\build\serialport.vcproj'. 
C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport>npm install 

> [email protected] install C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport 
> node-pre-gyp install --fallback-to-build 

node-pre-gyp ERR! Tried to download: https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.1/serialport-v4.0.1-node-v44-win32-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v44 ABI) (falling back to source compile with node-gyp) 

C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\iojs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean) else (node clean) 
gyp ERR! clean error 
gyp ERR! stack Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport\build' 
gyp ERR! stack  at Error (native) 
gyp ERR! System Windows_NT 6.3.9600 
gyp ERR! command "C:\\Program Files\\iojs\\node.exe" "C:\\Program Files\\iojs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "clean" 
gyp ERR! cwd C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport 
gyp ERR! node -v v2.2.1 
gyp ERR! node-gyp -v v1.0.3 
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd clean' (1) 
node-pre-gyp ERR! stack  at ChildProcess.<anonymous> (C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport\node_modules\node-pre-gyp\lib\util\compile.js:83:29) 
node-pre-gyp ERR! stack  at emitTwo (events.js:87:13) 
node-pre-gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
node-pre-gyp ERR! stack  at maybeClose (internal/child_process.js:763:16) 
node-pre-gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:210:5) 
node-pre-gyp ERR! System Windows_NT 6.3.9600 
node-pre-gyp ERR! command "C:\\Program Files\\iojs\\node.exe" "C:\\Users\\Jonathan\\AppData\\Roaming\\npm\\node_modules\\serialport\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" 
node-pre-gyp ERR! cwd C:\Users\Jonathan\AppData\Roaming\npm\node_modules\serialport 
node-pre-gyp ERR! node -v v2.2.1 
node-pre-gyp ERR! node-pre-gyp -v v0.6.29 
node-pre-gyp ERR! not ok 
Failed to execute 'node-gyp.cmd clean' (1) 

npm ERR! Windows_NT 6.3.9600 
npm ERR! argv "C:\\Program Files\\iojs\\node.exe" "C:\\Program Files\\iojs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v2.2.1 
npm ERR! npm v2.11.0 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'. 
npm ERR! This is most likely a problem with the serialport package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-pre-gyp install --fallback-to-build 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls serialport 
npm ERR! There is likely additional logging output above. 

答えて

1

あなたはgithubのリポジトリをクローン化された場合は、クローン化されたフォルダに移動して、NPM SERIALPORTの依存関係をインストールするインストールを実行する必要があります。

+0

ありがとうございました。しかし、npmのインストール中に別のエラーが発生しました。私の投稿の更新されたセクションに含まれています。 – John

+0

nodejs v2.2.1を使用する理由はありますか?ビルドプロセス中に、ビルドされたバージョンをフェッチしようとしますが、このバージョンのnodejには誰も存在しません。 nodejs v4以上を使用している場合は、事前ビルドが利用可能になります! – Cyril

+0

ありがとうございます。正常なバージョンにアップグレードすると、シリアルポートリストが正常に動作したときに、 – John

関連する問題