如何修复以下 Google Cloud Platform 部署错误? [错误 3]

How can I fix the following Google Cloud Platform deployment error? [Error 3]

我正在按照 'Using Cloud SQL with Node.js' 教程 (Using Cloud SQL - Node.js) 进行操作,但当我尝试将应用程序部署到 Google 云平台时出现以下错误。

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].

我尝试四处搜索,但没有找到针对此特定错误的任何解决方案。任何帮助,将不胜感激。谢谢!

我认为问题是我在安装后没有正确配置 Google Cloud SDK。回去配置一下,现在部署成功了。

使用 npm v2,文件树深度可能太长以至于 gcloud 有问题。

查看你的 npm 版本运行

npm -v

如果您 运行 任何早于 npm v3 的版本,请使用此命令升级

npm install -g npm@3

现在删除旧的 node_modules

Linux/macOS:

rm -r node_modules

Windows:

rd /s /q node_modules

并使用新版本的 npm 重新安装

npm install

现在,部署命令应该可以工作了

gcloud preview app deploy