GoogleCloudPlatform / training-data-analyst

Labs and demos for courses for GCP Training (http://cloud.google.com/training).
Apache License 2.0
7.79k stars 5.83k forks source link

Appdev cloudfunction prepare_web_environment does not work #916

Open paulwoelfel opened 4 years ago

paulwoelfel commented 4 years ago

If you try to run prepare_web_enviornment.sh in cloudfunctions folder it will fail as the dependencies are not installed.

This can be fixed by running npm install first.

paulwoelfel commented 4 years ago
npm ERR! request to https://registry.npmjs.org/pug failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/student_02_abffa52635bc/.npm/_logs/2020-05-12T11_06_44_265Z-debug.log
Creating Datastore entities
internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module '@google-cloud/datastore'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/student_02_abffa52635bc/training-data-analyst/courses/developingapps/v1.2/nodejs/pubsub-languageapi-spanner/start/server/gcp/datastore.js:16:21)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Project ID: qwiklabs-gcp-02-9f54e05a47c5