如何解决以下Google Cloud Platform部署错误? [错误3]

时间:2016-02-05 02:48:05

标签: node.js google-cloud-sql gcloud gcloud-node

我正在关注“使用Cloud SQL与Node.js”#39;教程(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].

我试过四处寻找,但没有找到任何解决此特定错误的方法。任何帮助,将不胜感激。谢谢!

2 个答案:

答案 0 :(得分: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

现在,deploy命令应该可以正常工作

gcloud preview app deploy

答案 1 :(得分:0)

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