1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Cloud Functionsでデプロイできない「i functions: cleaning up build files...」と言う謎のエラー。。。

Posted at

なぜかデプロイできない

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run build

> build
> tsc

✔  functions: Finished running predeploy script.
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
✔  functions: required API cloudbuild.googleapis.com is enabled
✔  artifactregistry: required API artifactregistry.googleapis.com is enabled
✔  functions: required API cloudfunctions.googleapis.com is enabled
i  functions: preparing codebase default for deployment
⚠  functions: package.json indicates an outdated version of firebase-functions. Please upgrade using npm install --save firebase-functions@latest in your functions directory.
⚠  functions: You are using an old version of firebase-functions SDK (3.15.4). Please update firebase-functions SDK to >=3.20.0
i  functions: preparing functions directory for uploading...
i  functions: packaged /Users/gen/Desktop/basic/hCalendar/functions (71.91 KB) for uploading
i  functions: ensuring required API cloudscheduler.googleapis.com is enabled...
✔  functions: required API cloudscheduler.googleapis.com is enabled
✔  functions: functions folder uploaded successfully
i  functions: creating Node.js 10 function scheduledFirestoreExport(asia-northeast2)...
⚠  functions: failed to create function projects/hcalendar-7c1f4/locations/asia-northeast2/functions/scheduledFirestoreExport
Failed to create function projects/hcalendar-7c1f4/locations/asia-northeast2/functions/scheduledFirestoreExport

Functions deploy had errors with the following functions:
	scheduledFirestoreExport(asia-northeast2)
i  functions: cleaning up build files...

Error: There was an error deploying functions

i functions: cleaning up build files...は一体何ですか???:frowning2:

# Get the latest version of the firebase command
npm install -g firebase-tools

# Unlock the deletegcfartifacts command
firebase --open-sesame deletegcfartifacts

# Run a full purge of your GCF artifacts directories
firebase functions:deletegcfartifacts

こちらを試してみるも変換なし・・・。

よくみるとfirebase-functions SDKのバージョンアップを求められていた!

⚠  functions: package.json indicates an outdated version of firebase-functions. Please upgrade using npm install --save firebase-functions@latest in your functions directory.
⚠  functions: You are using an old version of firebase-functions SDK (3.15.4). Please update firebase-functions SDK to >=3.20.0

Screen Shot 2022-07-04 at 22.21.12.png

これだ!!!

/path_to_your_project/functionsのように、ターミナルの現在地をfunctionsの階層へ移動して

sudo npm install --save firebase-functions@latest

これを実行すればfunctionsのデプロイに成功しました!!!:relaxed:

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?