Meta tags:
Headings (most frequently used words):
modules, dependencies, node, js, package, manager, private, with, and, your, npm, deployment, using, build, copied, from, specify, in, stay, organized, collections, save, categorize, content, based, on, preferences, use, to, install, locally, configure, system, packages, including, local, loading, function, yarn, pnpm, bun, executing, custom, steps, during, artifact, registry, other, repositories, prerequisites, for, products, pricing, support, resources, engage, file, format,
Text of the page (most frequently used words):
the (105), cloud (65), your (59), and (51), run (48), you (40), with (38), #function (37), deploy (37), for (35), from (33), file (31), node (31), functions (31), #dependencies (30), package (29), using (28), npm (26), build (25), overview (25), service (24), install (22), services (22), code (20), json (16), use (16), bun (16), this (14), can (14), worker (14), google (13), environment (13), private (13), create (12), vpc (12), configure (12), jobs (12), pools (12), source (11), modules (11), registry (11), yarn (11), module (11), gpu (11), container (11), command (10), that (10), custom (10), samples (9), local (9), manager (9), when (9), lock (9), storage (9), view (9), volumes (9), execute (9), sample (8), gcloud (8), set (8), following (8), deployment (8), include (8), pnpm (8), best (8), practices (8), trigger (8), triggers (8), resources (7), thumb (7), are (7), directory (7), node_modules (7), tutorial (7), application (7), dependency (7), requests (7), pub (7), sub (7), maximum (7), all (6), other (6), need (6), java (6), token (6), repository (6), access (6), only (6), security (6), folder (6), runtime (6), development (6), migrate (6), agents (6), metrics (6), memory (6), limits (6), python (6), manage (5), see (5), more (5), send (5), specify (5), name (5), copied (5), during (5), npmrc (5), write (5), artifact (5), example (5), production (5), project (5), configuration (5), tools (5), networking (5), migration (5), gpus (5), network (5), traffic (5), delete (5), job (5), eventarc (5), invoke (5), português (4), español (4), about (4), system (4), products (4), down (4), content (4), version (4), locally (4), installing (4), don (4), documentation (4), also (4), higher (4), host (4), require (4), installs (4), buildpack (4), base (4), image (4), req (4), http (4), request (4), data (4), framework (4), management (4), containers (4), inference (4), identity (4), direct (4), scaling (4), instance (4), health (4), variables (4), optimize (4), instances (4), events (3), understand (3), details (3), developers (3), env (3), vars (3), true (3), gcloudignore (3), running (3), have (3), variable (3), auth (3), should (3), any (3), note (3), not (3), https (3), pkg (3), dev (3), repository_name (3), project_id (3), region_id (3), without (3), credentials (3), part (3), within (3), execution (3), packages (3), script (3), declared (3), steps (3), uses (3), automatic (3), detection (3), res (3), external (3), metadata (3), based (3), guides (3), hosting (3), frameworks (3), monitoring (3), solutions (3), distributed (3), databases (3), introduction (3), web (3), mcp (3), log (3), secure (3), authenticate (3), connectors (3), cost (3), optimization (3), autoscale (3), labels (3), secrets (3), checks (3), ephemeral (3), disk (3), cifs (3), smb (3), nfs (3), volume (3), mounts (3), entrypoint (3), cpu (3), retries (3), connect (3), firestore (3), concurrent (3), console (3), product (3), 한국어 (2), 日本語 (2), עברית (2), brasil (2), italiano (2), indonesia (2), français (2), américa (2), latina (2), deutsch (2), english (2), sign (2), terms (2), site (2), youtube (2), started (2), github (2), support (2), pricing (2), information (2), last (2), updated (2), 2026 (2), utc (2), licensed (2), under (2), license (2), feedback (2), engine (2), time (2), remove (2), function_entry_point (2), replace (2), google_vendor_npm_dependencies (2), working (2), these (2), copy (2), those (2), alongside (2), skip (2), npm_token (2), authorization (2), text (2), value (2), auth_token (2), field (2), npmjs (2), org (2), registry_domain (2), line (2), permissions (2), such (2), allow (2), target (2), repositories (2), read (2), created (2), home (2), required (2), scope (2), list (2), additional (2), yarnrc (2), yml (2), process (2), automatically (2), account (2), load (2), installed (2), mymodule (2), mymoduledir (2), containing (2), gcp (2), available (2), after (2), executing (2), step (2), perform (2), while (2), nodejs24 (2), google_package_manager (2), explicit (2), lockfile (2), detects (2), lockb (2), existing (2), choose (2), exists (2), instead (2), yaml (2), get (2), into (2), uuid (2), world (2), body (2), escapehtml (2), hello (2), param (2), object (2), context (2), escape (2), html (2), const (2), recommend (2), public (2), managed (2), sdk (2), languages (2), infrastructure (2), costs (2), usage (2), observability (2), industry (2), hybrid (2), multicloud (2), analytics (2), pipelines (2), compute (2), troubleshoot (2), oci (2), app (2), assisted (2), llm (2), remote (2), server (2), adk (2), a2a (2), logging (2), prometheus (2), projects (2), controls (2), static (2), shared (2), connector (2), automate (2), workflows (2), description (2), systems (2), capacity (2), rollbacks (2), pool (2), revisions (2), continuous (2), tags (2), timeout (2), tasks (2), testing (2), integrate (2), workflow (2), runtimes (2), images (2), configurations (2), serving (2), serve (2), git (2), returns (2), results (2), php (2), ruby (2), plan (2), prepare (2), develop (2), cases (2), cross (2), reference (2), technology (2), areas (2), close (2), subscribe, newsletter, our, third, decade, climate, action, join, cookies, privacy, tech, twitter, blog, engage, training, certification, architecture, center, getting, status, release, notes, community, forums, contact, sales, marketplace, easy, easytounderstand, solved, problem, solvedmyproblem, otherup, hard, hardtounderstand, incorrect, incorrectinformationorsamplecode, missing, missingtheinformationsamplesineed, otherdown, tell, except, otherwise, noted, page, registered, trademark, oracle, its, affiliates, policies, apache, creative, commons, attribution, specified, downloaded, suppress, behavior, entry, point, deploying, ensuring, same, one, ensure, want, prerequisites, whose, included, directly, rebuilt, own, them, argument, either, literal, string, which, replaces, actual, domain, hosted, _authtoken, format, necessary, make, sure, explicitly, increase, explains, how, tokens, discourage, because, contains, could, pose, risk, npmscopes, npmregistryserver, npmalwaysauth, approach, works, always, generates, generating, providing, settings, authenticating, named, import, files, loading, tool, creates, default, added, uploaded, manually, upload, zip, successfully, stored, somewhere, than, root, achieve, declaring, refers, prefix, including, includes, number, there, just, executed, fields, removes, regenerates, devdependencies, adding, still, executes, must, requirements, buildpacks, building, method, maintain, lockfiles, opt, configuring, follow, supports, maintaining, structure, mechanisms, variety, client, libraries, machine, downloads, lets, developing, marks, latest, very, important, combines, two, easiest, way, adds, query, hellohttp, response, type, header, responds, parsed, according, imports, lists, prioritizes, add, relies, mirror, mirrored, avoid, internet, although, behalf, clarity, allowed, well, expressed, called, save, categorize, preferences, stay, organized, collections, known, issues, troubleshooting, errors, gke, kubernetes, vmware, tanzu, spring, music, compliant, strategy, foundry, heroku, aws, lambda, 1st, gen, cookbook, vibe, coding, accelerated, video, transcoding, ffmpeg, batch, fine, tune, llms, hugging, face, transformers, opencv, acceleration, gemma, models, ollama, browser, automation, servers, n8n, explore, tracing, error, reporting, audit, logs, opentelemetry, built, monitor, multi, tenant, platforms, untrusted, software, supply, chain, insights, constraints, customer, encryption, keys, threat, binary, protect, armor, iap, control, iam, end, user, authentication, users, audiences, design, mesh, restrict, endpoint, ingress, outbound, address, standard, dual, stack, ipv4, ipv6, register, ips, dns, pull, subscriptions, runners, kafka, autoscaler, scale, count, splits, background, work, checkpoints, stop, executions, task, parallelism, scheduled, completion, event, driven, zonal, redundancy, general, tips, grpc, database, routed, entries, processing, call, push, subscription, asynchronous, series, schedule, asynchronously, websocket, chat, stream, websockets, webhook, updates, supported, language, manual, minimum, autoscaling, sandboxes, port, recommender, billing, per, performance, gradual, rollouts, frontend, proxying, nginx, enable, session, affinity, failover, multiple, regions, assets, cdn, mapping, domains, compose, sources, test, codelabs, spanner, bigquery, tutorials, net, compare, commands, containerize, shell, sveltekit, nuxt, next, angular, ssr, kotlin, agent, kit, streamlit, smolagents, langchain, gradio, fastapi, flask, good, fit, contract, resource, model, discover, start, free, main,
Text of the page (random words):
thin your container plan and prepare your function overview compare cloud run functions write cloud run functions runtimes overview node js overview node js dependencies python overview python dependencies go overview go dependencies java overview java dependencies net ruby php local functions development function triggers tutorials create a function that returns bigquery results create a function that returns spanner results integrate with cloud databases codelabs build and test build sources to containers build functions to containers local testing serve http requests deploy services deploy container images continuous deployment from git deploy from source code deploy from compose use the cloud run remote mcp server deploy functions serve web traffic mapping custom domains serving static assets with cdn serving traffic from multiple regions automate failover with service health enable session affinity frontend proxying using nginx manage services view copy or delete services view or delete revisions traffic migration gradual rollouts rollbacks configure services overview capacity memory limits cpu limits gpu gpu configuration gpu performance best practices request timeout maximum concurrent requests about maximum concurrent requests per instance configure maximum concurrent requests billing optimize service configurations with recommender environment container port and entrypoint environment variables volume mounts cloud storage volumes nfs volumes in memory volumes cifs smb ephemeral disk execution environment sandboxes container health checks http 2 requests secrets service identity scaling about instance autoscaling for services maximum instances about maximum instances for services configure maximum instances minimum instances configure custom scaling controls manual scaling metadata description labels tags source deploy configurations supported language runtimes and base images configure automatic base image updates build environment variables build service account build worker pools invoke and trigger services invoke with https requests host a webhook target stream with websockets overview build a websocket chat service tutorial invoke asynchronously invoke services on a schedule create a workflow invoke services as part of a workflow connect a series of services from cloud functions and cloud run tutorial execute asynchronous tasks call a service from a pub sub push subscription trigger service from pub sub integrate image processing into pub sub sample tutorial trigger from events create triggers with eventarc pub sub triggers create pub sub eventarc triggers trigger functions from pub sub using eventarc trigger functions from routed log entries cloud storage triggers create triggers with cloud storage trigger services from cloud storage using eventarc trigger functions from cloud storage using eventarc firestore triggers create triggers with firestore trigger functions from events in a firestore database connect with other services using grpc best practices general development tips for services cost optimization optimize java services optimize python services optimize node js services load testing best practices understand zonal redundancy functions best practices overview configure event driven function retries execute job tasks to completion create jobs execute jobs execute jobs execute scheduled jobs execute jobs from workflows configure jobs container entrypoint cpu limits memory limits gpu gpu configuration gpu best practices environment variables container health checks volume mounts cloud storage volumes nfs volumes in memory volumes using cifs smb network file systems ephemeral disk labels maximum retries parallelism secrets service identity task timeout tags manage jobs view or delete jobs view or stop job executions best practices jobs retries and checkpoints cost optimization perform continuous background work deploy worker pools deploy worker pools deploy worker pools from source code manage worker pools view or delete worker pools view or delete worker pool revisions instance splits and rollbacks configure worker pools capacity memory limits cpu limits gpu gpu configuration gpu best practices environment container and entrypoint environment variables volume mounts cloud storage volumes nfs volumes in memory volumes using cifs smb network file systems ephemeral disk container health checks secrets service identity instance count metadata description labels scale based on external metrics autoscale worker pools with external metrics kafka autoscaler host github runners with worker pools autoscale worker pools based on prometheus metrics autoscale worker pools with pub sub pull subscriptions automate scaling with workflows cost optimization configure networking best practices for cloud run networking configure private networking send traffic to vpc network overview direct vpc register private ips for worker pools using cloud dns dual stack ipv4 and ipv6 migrate standard vpc connector to direct vpc vpc connectors send traffic to shared vpc network overview direct vpc migrate shared vpc connector to direct vpc connectors in service projects connectors in host project static outbound ip address network security restrict endpoint ingress services use vpc service controls vpc sc cloud service mesh secure security design overview authenticate requests overview allow public access custom audiences authenticate developers service to service authenticate users end user authentication tutorial secure your resources access control with iam configure iap for cloud run introduction to service identity protect services with cloud armor use binary authorization use cloud run threat detection use customer managed encryption keys manage custom constraints for projects view software supply chain security insights secure cloud run services tutorial multi tenant platforms running untrusted code monitor and log monitoring and logging overview view built in metrics write prometheus metrics write opentelemetry metrics log and view logs audit logging error reporting use distributed tracing for services run ai solutions overview explore resources ai agents overview build and deploy a2a agents overview deploy a2a agents build and deploy adk agents build and deploy n8n agents mcp servers overview build and deploy a remote mcp server tools code execution browser automation inference with gpus overview services run llm inference on cloud run gpus with ollama run agents with gemma 4 models on cloud run run opencv on cloud run with gpu acceleration run llm inference on cloud run gpus with hugging face transformers js jobs fine tune llms using gpus with cloud run jobs run batch inference using gpus with cloud run jobs gpu accelerated video transcoding with ffmpeg ai assisted development and vibe coding introduction to cloud run for ai assisted developers cookbook migrate an existing web service from app engine from cloud run functions 1st gen from aws lambda from heroku from cloud foundry migration overview choose an oci compliant strategy migrate to oci containers migrate configuration sample migration spring music from vmware tanzu from a vm using migrate to containers from kubernetes to gke troubleshoot introduction troubleshoot errors local troubleshooting tutorial known issues samples all cloud run code samples all cloud run functions code samples code samples for all products ai and ml application development application hosting compute data analytics and pipelines databases distributed hybrid and multicloud industry solutions migration networking observability and monitoring security storage access and resources management costs and usage management infrastructure as code sdk languages frameworks and tools home documentation application hosting cloud run guides send feedback specify dependencies in node js stay organized with collections save and categorize content based on your preferences a function is allowed to use external node js modules as well as local data dependencies in node js are managed with npm and expressed in a metadata file called package json you can use npm yarn pnpm or bun to install node js dependencies the node js functions framework is a required dependency for all functions although cloud run functions installs it on your behalf when the function is created we recommend that you include it as an explicit dependency for clarity if your function relies on private dependencies we recommend that you mirror functions framework to your private registry include the mirrored functions framework as a dependency to your function to avoid installing the package from the public internet to specify a dependency for your function add it to your package json file if the node js buildpack detects a lock file such as package lock json yarn lock pnpm lock yaml bun lock or bun lockb within your project it prioritizes that lock file when you install dependencies using npm ci yarn install pnpm install or bun install the following example lists a dependency in the package json file dependencies escape html 1 0 3 cloud run imports the dependency in the function const functions require google cloud functions framework const escapehtml require escape html responds to an http request using data from the request body parsed according to the content type header param object req cloud function request context param object res cloud function response context functions http hellohttp req res res send hello escapehtml req query name req body name world use npm to install node js modules locally the easiest way to install a node js module locally is to use the npm install command in the folder containing your cloud run function for example the following command adds the uuid module npm install uuid this combines two steps it marks the latest version of the module as a dependency in your package json file this is very important cloud run functions only installs modules that are declared in your package json file it downloads the module into your node_modules directory this lets you use the module when developing locally if you don t have npm installed on your machine get npm note npm packages are available for a variety of google cloud products see node js client libraries configure deployment dependencies you can install production dependencies for npm yarn or pnpm npm package manager when you deploy your function cloud run functions installs dependencies declared in the package json file using the npm install command npm install production yarn package manager in the node js 8 runtime and higher if a yarn lock file exists cloud run functions instead uses the yarn install command yarn install production pnpm package manager in the node js 8 runtime and higher if a pnpm lock yaml file exists cloud run functions instead uses the pnpm install command pnpm install bun package manager the node js buildpack supports the bun package manager with the bun package manager you can install dependencies while maintaining your existing node js project structure and runtime version you can choose any of the following mechanisms to install dependencies using bun automatic detection the node js buildpack detects the bun package manager when you include a bun lock or bun lockb file in your project for configuring automatic detection with bun follow these steps create the lockfile bun install lockfile only deploy to cloud run by running the following command gcloud run deploy source base image nodejs24 explicit opt in set the google_package_manager environment variable to bun with this method you don t need to create and maintain lockfiles run the following command to deploy to cloud run gcloud run deploy source base image nodejs24 set build env vars google_package_manager bun while buildpack uses bun for installing dependencies the node js runtime still executes your application your project must include a package json file for more details on configuration requirements see building a node js application in the buildpacks documentation executing custom build steps during deployment after you deploy you can perform a custom build step during the function build process by adding a gcp build script in your package json file when this script is executed the dependencies in the dependencies and devdependencies fields of your package json file are available after executing your custom build step cloud run functions removes and regenerates the node_modules folder by only installing the production dependencies declared in the dependencies field of your package json file if there is no gcp build script in package json cloud run functions just installs production dependencies using system packages the node js runtime also includes a number of system packages in the execution environment including local node js modules you can also include local node js modules as part of your function you can achieve this by declaring your module in package json using the file prefix in the following example mymodule refers to your module name and mymoduledir is the directory containing your module dependencies mymodule file mymoduledir the code for this local module should be stored somewhere other than the node_modules folder within your function s root directory note if you deploy using the gcloud command line tool gcloud automatically creates a gcloudignore file in your function s directory by default the node_modules folder is added to this gcloudignore and is not uploaded as part of your deployment you don t need to include the node_modules folder when you manually upload code as a zip file you can successfully deploy your function without the the node_modules folder loading node js modules use the node js require function to load any node js module you have installed you can also use the require function to import local files you deploy alongside your function using private modules you can use a private npm module by providing settings for authenticating with the registry in a npmrc file in the function s directory if you re using yarn v2 or higher as your package manager this file is named yarnrc yml private modules from artifact registry an artifact registry node js package repository can host private modules for your function when you deploy a cloud run functions function the build process automatically generates artifact registry credentials for the cloud build service account you only need to list the artifact registry repository in your npmrc without generating additional credentials for example scope registry https region_id npm pkg dev project_id repository_name region_id npm pkg dev project_id repository_name always auth true this approach also works for the yarn v1 package manager if you re using yarn v2 or higher you only need to list the artifact registry repository in your yarnrc yml without additional credentials for example npmscopes scope npmregistryserver https region_id npm pkg dev project_id repository_name npmalwaysauth true private modules...
|