0

I was following the 'Using Cloud SQL with Node.js' tutorial (Using Cloud SQL - Node.js) and the following error occurred when I tried deploying the app to the 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].

I tried searching around but didn't find any solutions to this specific error. Any help would be appreciated. Thanks!

Justin Beckwith
  • 7,686
  • 1
  • 33
  • 55

2 Answers2

1

With npm v2, it is possible that the file tree depth is so long that gcloud has a problem with it.

Check what version of npm you are running

npm -v

If you are running anything older than npm v3, upgrade with this command

npm install -g npm@3

Now remove the old node_modules

Linux/macOS:

rm -r node_modules

Windows:

rd /s /q node_modules

And reinstall with the new version of npm

npm install

Now, the deploy command should work

gcloud preview app deploy
Sandeep Dinesh
  • 2,035
  • 19
  • 19
  • I know that in your specific case it was because the SDK was not configured, but just in case other people run into this error because of the depth of the tree, I wanted to post this solution. – Sandeep Dinesh Mar 10 '16 at 23:21
  • 1
    Thanks, this worked perfectly for me. **For windows users**, you may not have the rm command so just delete the node_modules directory by other means. – Vaughn Jun 12 '16 at 05:18
0

I think the problem was I didn't properly configure the Google Cloud SDK after installation. Went back to configure it and now it's successfully deploying.

  • 3
    What do you mean by you didn't configure Google Cloud SDL after installation. Can you please provide the details on what configuration you provided to resolve this issue? It would be a great help. – Jay Aug 02 '16 at 13:02