2016-04-03 7 views
0

AWSでホストされているJhipsterでプロジェクトを作成しました。状況はかなりうまくいっていましたが、コンピュータをフォーマットしてすべてを再インストールする必要がありました(同じOS - Ubuntu 15.10)。次に、nodej 5.10.0、npm 3.8.3、Jhipster 3.0をインストールしました。 Jhipsterをインストールするためには、私はhere説明した手順に従ったが、パッケージをインストールするsudoを使用して:Jhipster - AWSモジュールのインストール

sudo npm install -g yo 
sudo npm install -g bower 
sudo npm install -g grunt 
sudo npm install -g generator-jhipster 

(マイプロジェクトは、もともとJhipster 2.23に基づいて構築し、一気の代わりに面倒を使用しました)。

そして、Iがステップ(sudoを使用して、もう一度)AWSジェネレータをインストールするhereを説明し、続いて:/usr/local/lib/node_modules$sudo npm install aws-sdk progress node-uuid

を私のシステムでは、代わりのインストール、グローバルノードモジュールは/usr/lib/node_modulesで見つけることができ。

しかし、私はこれらのモジュールをインストールするコマンドを実行すると、私はエラーメッセージとgenerator-jhipsterフォルダを取得するには、削除された(!)

$cd /usr/lib/node_modules/generator-jhipster 
$sudo npm install aws-sdk progress node-uuid 
[email protected] /usr/lib/node_modules/generator-jhipster 
├── [email protected] extraneous 
├── [email protected] extraneous 
└── [email protected] extraneous 

npm ERR! Linux 4.2.0-34-generic 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "aws-sdk" "progress" "node-uuid" 
npm ERR! node v5.10.0 
npm ERR! npm v3.8.3 
npm ERR! path /usr/lib/node_modules/generator-jhipster/node_modules/.staging/generator-jhipster-ad396f5f 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall rename 

npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/generator-jhipster/node_modules/.staging/generator-jhipster-ad396f5f' -> '/usr/lib/node_modules/generator-jhipster' 
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/generator-jhipster/node_modules/.staging/generator-jhipster-ad396f5f' -> '/usr/lib/node_modules/generator-jhipster' 
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! Linux 4.2.0-34-generic 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "aws-sdk" "progress" "node-uuid" 
npm ERR! node v5.10.0 
npm ERR! npm v3.8.3 
npm ERR! path npm-debug.log.2689400133 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall open 

npm ERR! enoent ENOENT: no such file or directory, open 'npm-debug.log.2689400133' 
npm ERR! enoent ENOENT: no such file or directory, open 'npm-debug.log.2689400133' 
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!  /usr/lib/node_modules/generator-jhipster/npm-debug.log 

私は私の以前の環境でそれをインストールしたとき、私も持っていた覚えていますawsモジュールのインストールに問題がありましたが、何らかのトリックを使って動作させることができました。私は今回は何も思い付きませんでした。

私は過去に(2.23)持っていた同じジプスターバージョンをインストールしようとしましたが、node_managerフォルダへのアクセス権を変更して、sudoなしですべてを実行しようとしましたが、ホームフォルダにインストールしようとしました。 generator-jhipsterフォルダの下にnpm install aws-sdk progress node-uuidを実行すると、以前のエラーが発生し、そのフォルダが削除されます。

アイデア?

EDIT:@gaël-marziouのヒントに従うと、nvmを使用してノードを再インストールしました。私はノードv4.4.2をインストールしました。これはLTSバージョンです。今はすべて~/.nvmフォルダにインストールされています。

~/.nvm/versions/node/v4.4.2/lib/node_modules/generator-jhipster$ npm install aws-sdk progress node-uuid 
[email protected] /home/jodevan/.nvm/versions/node/v4.4.2/lib/node_modules/generator-jhipster 
├── [email protected] extraneous 
├── [email protected] extraneous 
└── [email protected] extraneous 

npm ERR! Linux 4.2.0-34-generic 
npm ERR! argv "/home/jodevan/.nvm/versions/node/v4.4.2/bin/node" "/home/jodevan/.nvm/versions/node/v4.4.2/bin/npm" "install" "aws-sdk" "progress" "node-uuid" 
npm ERR! node v4.4.2 
npm ERR! npm v3.8.5 
npm ERR! path /home/jodevan/.nvm/versions/node/v4.4.2/lib/node_modules/generator-jhipster/node_modules/.staging/generator-jhipster-b76490c0 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall rename 

npm ERR! enoent ENOENT: no such file or directory, rename '/home/jodevan/.nvm/versions/node/v4.4.2/lib/node_modules/generator-jhipster/node_modules/.staging/generator-jhipster-b76490c0' -> '/home/jodevan/.nvm/versions/node/v4.4.2/lib/node_modules/generator-jhipster' 
npm ERR! enoent ENOENT: no such file or directory, rename '/home/jodevan/.nvm/versions/node/v4.4.2/lib/node_modules/generator-jhipster/node_modules/.staging/generator-jhipster-b76490c0' -> '/home/jodevan/.nvm/versions/node/v4.4.2/lib/node_modules/generator-jhipster' 
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! Linux 4.2.0-34-generic 
npm ERR! argv "/home/jodevan/.nvm/versions/node/v4.4.2/bin/node" "/home/jodevan/.nvm/versions/node/v4.4.2/bin/npm" "install" "aws-sdk" "progress" "node-uuid" 
npm ERR! node v4.4.2 
npm ERR! npm v3.8.5 
npm ERR! path npm-debug.log.151200600 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall open 

npm ERR! enoent ENOENT: no such file or directory, open 'npm-debug.log.151200600' 
npm ERR! enoent ENOENT: no such file or directory, open 'npm-debug.log.151200600' 
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/jodevan/.nvm/versions/node/v4.4.2/lib/node_modules/generator-jhipster/npm-debug.log 

おかげで、 Jodevan:私はgenerator-jhipsterフォルダの下にエイミーパッケージをインストールしようとすると、私は同じ問題を得ました。

答えて

1

いくつかのコメント:

  • あなたはsudoを使用してNPMを実行するべきではありません(https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.mdを参照)
  • 我々はドキュメントにそれをお勧めとしてあなたはノードのLTSバージョンを使用する必要があります。
  • また、Ubuntuを使用している場合は、nvmを使用してノードをインストールすることをお勧めします。この方法で複数のバージョンを使用できます。

:JHipsterは、2.xから3.0へのプロジェクトアップグレードをサポートしていません。あなたが使用したのと同じバージョンをインストールする必要があり

npm install -g [email protected]

+0

1.不思議です。私が覚えている限り、私はこれまでと同じ方法でインストールしました。私はこれらの手順を使用してインストールしました:https://github.com/nodesource/distributions#debinstall。 2. **どのノードのバージョンをお勧めしますか?**私は4.xと5.xの両方を試しました。 3.私はnvmに試してみましょう。 ところで、私はJhipsterをアップグレードしていません。私はコンピュータをフォーマットしなければならなかったので、バージョン3.0をインストールしましたが、私はそれを2.23にダウングレードしました。私が望むのは、awsモジュールを使用してプロジェクトをAWSにデプロイすることだけです。 ありがとう! – Jodevan

+0

変更を提案しました。まだ運がありません。他のアイデア?ありがとう! – Jodevan

+0

OK sudoノードを修正し、sudo npmのリンクを与えました。最新のLTSを使用しています。 4.4.x。これはjhipsterの問題のようには見えませんがenvironementの問題ではありませんが、nvmは使用しませんが、これをトレースで見ることができます:npm ERR! argv "/home/jodevan/.nvm/versions/node/v4.4.2/bin/node" "/home/jodevan/.nvm/versions/node/v4.4.2/bin/npm" "install" "aws-sdk "" progress "" node-uuid " –

0

まあが、私はもう一度私のシステムを再インストールする必要が終わったとこの時間すべてがうまく働きました。私はnode v.4.4をインストールしました。4(LTS)のppaリポジトリをhttps://nodejs.org/en/download/package-managerに見つけました(以前の試みでもこれをやっていました)。また、http://jhipster.github.io/installationにある指示とhttp://jhipster.github.io/awsにリストされている同じ指示を使用してJHipster(2.23)とその依存関係をインストールしました。

すべてが完全に機能します。行く数字...

+0

何が起こったか分かりました。ノードをインストールしたとき、npmのバージョンは2.xでした。 'npm install aws-sdk progress node-uuid'を実行すると、このバージョンで動作します。私の以前の試みでは、npm(npm install npm)をアップグレードしていました。私のnpmバージョンは3.9.5になりました。 'npm install aws-sdk progress node-uuid'を実行することは、このnpmバージョンとこのすべての問題がどのように始まったかでうまくいっていません。 – Jodevan

関連する問題