0

「Using Cloud SQL with Node.js」チュートリアル ( Using Cloud SQL - Node.js ) に従っていましたが、アプリを Google Cloud Platform にデプロイしようとすると、次のエラーが発生しました。

Beginning deployment...
If this is your first deployment, this may take a while...done.

Verifying that Managed VMs are enabled and ready.
Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH key
pair.
Building and pushing image for module [default]
----------------------------- DOCKER BUILD OUTPUT ------------------------------

Beginning teardown of remote build environment (this may take a few seconds).
ERROR: gcloud crashed (WindowsError): [Error 3] The system cannot find the path
specified: 'C:\\Users\\username\\Desktop\\nodejs-getting-started\\2-structured-data\\
node_modules\\gcloud\\node_modules\\gce-images\\node_modules\\google-auto-auth\\
node_modules\\google-auth-library\\node_modules\\gtoken\\node_modules\\google-p1
2-pem\\node_modules\\node-forge\\flash\\PooledSocket.as'

If you would like to report this issue, please run the following command:
  gcloud feedback
Deleted [https://www.googleapis.com/compute/v1/projects/nodejscloudex/zones/us-c
entral1-f/instances/gae-builder-vm-20160204t212716].

周りを検索してみましたが、この特定のエラーに対する解決策は見つかりませんでした。どんな助けでも大歓迎です。ありがとう!

4

2 に答える 2

1

npm v2 では、ファイル ツリーの深さが長すぎgcloudて問題が発生する可能性があります。

実行している npm のバージョンを確認する

npm -v

npm v3 より古いものを実行している場合は、このコマンドでアップグレードしてください

npm install -g npm@3

古い node_modules を削除します

Linux/macOS:

rm -r node_modules

ウィンドウズ:

rd /s /q node_modules

そして、新しいバージョンのnpmで再インストールします

npm install

これで、デプロイ コマンドが機能するはずです

gcloud preview app deploy
于 2016-03-10T23:13:08.487 に答える