Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment failing: Error: Failed to load function definition from source: Failed to generate manifest from function source: TypeError: Intl.supportedValuesOf is not a function #190

Open
mfb-remotesocial opened this issue Jun 8, 2023 · 0 comments

Comments

@mfb-remotesocial
Copy link

mfb-remotesocial commented Jun 8, 2023

I'm finding an issue deploying to Cloud Functions has started since I implemented a cloud function that includes using the Intl built-in function (as used by packages like Luxon).

Here's the deployment action for github in total:

name: deploy-firebase-functions-and-all-rules
'on':
    push:
        branches:
            - staging

concurrency:
    group: staging-functions-deploy
    cancel-in-progress: true

jobs:
    lint-test-deploy:
        runs-on: ubuntu-latest
        name: Lint Test Build rs2mono Staging
        steps:
            - name: Checkout Repo
              uses: actions/checkout@v3
            - uses: actions/setup-node@v3
              with:
                  node-version: '18'
                  cache: 'yarn'
            - name: Install test and build
              run: |
                  yarn workspace @rs2/functions install --immutable
                  yarn run lint_functions
                  yarn run test_functions
            - name: Deploy Functions and all Rules to STAGING
              uses: w9jds/firebase-action@master
              with:
                  args: deploy --only functions,storage,database,firestore:rules

              env:
                  FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_DEV }}
                  PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_DEV }}

And here's the output from the failed GitHub action run using w9jds/firebase-action@master:

Run w9jds/firebase-action@master
  with:
    args: deploy --only functions,storage,database,firestore:rules
  env:
    FIREBASE_TOKEN: ***
    PROJECT_ID: ***
/usr/bin/docker run --name w9jdsfirebaseactionv11300_b7afb4 --label ed866e --workdir /github/workspace --rm -e "FIREBASE_TOKEN" -e "PROJECT_ID" -e "INPUT_ARGS" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/rs[2](https://github.com/remote-social/rs2mono/actions/runs/5194690745/jobs/9392614639#step:6:2)mono/rs2mono":"/github/workspace" w9jds/firebase-action:v11.[3](https://github.com/remote-social/rs2mono/actions/runs/5194690745/jobs/9392614639#step:6:3)0.0 deploy --only functions,storage,database,firestore:rules
setting firebase project to ***
⚠  Authenticating with `FIREBASE_TOKEN` is deprecated and will be removed in a future major version of `firebase-tools`. Instead, use a service account key with `GOOGLE_APPLICATION_CREDENTIALS`: https://cloud.google.com/docs/authentication/getting-started
Now using alias *** (rs2-***)
⚠  Authenticating with `FIREBASE_TOKEN` is deprecated and will be removed in a future major version of `firebase-tools`. Instead, use a service account key with `GOOGLE_APPLICATION_CREDENTIALS`: https://cloud.google.com/docs/authentication/getting-started

=== Deploying to 'rs2-***'...

i  deploying database, storage, firestore, functions
i  database: checking rules syntax...
✔  database: rules syntax for database rs2-***-default-rtdb is valid
i  firebase.storage: checking storage.rules for compilation errors...
✔  firebase.storage: rules file storage.rules compiled successfully
i  firestore: reading indexes from firestore.indexes.json...
i  cloud.firestore: checking firestore.rules for compilation errors...
✔  cloud.firestore: rules file firestore.rules compiled successfully
i  functions: preparing codebase default for deployment
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
i  artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
✔  functions: required API cloudfunctions.googleapis.com is enabled
✔  functions: required API cloudbuild.googleapis.com is enabled
✔  artifactregistry: required API artifactregistry.googleapis.com is enabled

Error: Failed to load function definition from source: Failed to generate manifest from function source: TypeError: Intl.supportedValuesOf is not a function

running a deployment to Firebase Functions directly from local machine with the same version (11.30.0) of firebase-tools results in:

mono % firebase deploy --only functions     

=== Deploying to 'rs2-***'...

i  deploying functions
i  functions: preparing codebase default for deployment
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
i  artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
✔  functions: required API cloudfunctions.googleapis.com is enabled
✔  artifactregistry: required API artifactregistry.googleapis.com is enabled
✔  functions: required API cloudbuild.googleapis.com is enabled
i  functions: preparing packages/_functions directory for uploading...
i  functions: packaged /Users/***/Documents/firebase/rs2/mono/packages/_functions (129.49 KB) for uploading
i  functions: ensuring required API cloudscheduler.googleapis.com is enabled...
✔  functions: required API cloudscheduler.googleapis.com is enabled
i  functions: Skipping the deploy of unchanged functions with experimental support for skipdeployingnoopfunctions
✔  functions[connect-createActivity(us-central1)] Skipped (No changes detected)
✔  functions[platform-authentication-auth(us-central1)] Skipped (No changes detected)
✔  functions[platform-authentication-getAuthTypeByEmail(us-central1)] Skipped (No changes detected)
✔  functions[platform-authentication-sendResetPassword(us-central1)] Skipped (No changes detected)
✔  functions[platform-authentication-sendVerifyEmail(us-central1)] Skipped (No changes detected)
✔  functions[platform-authentication-updateAuthUserDetails(us-central1)] Skipped (No changes detected)
✔  functions[platform-authentication-userCreated(us-central1)] Skipped (No changes detected)
✔  functions[platform-authentication-userDeleted(us-central1)] Skipped (No changes detected)
✔  functions[platform-connect-createActivity(us-central1)] Skipped (No changes detected)
✔  functions[platform-cron-schedule-fiveMin(us-central1)] Skipped (No changes detected)
✔  functions[platform-cron-event-fiveMin(us-central1)] Skipped (No changes detected)
✔  functions[platform-cron-event-weekly(us-central1)] Skipped (No changes detected)
✔  functions[platform-org-createOrg(us-central1)] Skipped (No changes detected)
✔  functions[platform-slack-inbound-events(us-central1)] Skipped (No changes detected)
✔  functions[platform-slack-processOauth(us-central1)] Skipped (No changes detected)
✔  functions[platform-slack-team-onTeamCreated(us-central1)] Skipped (No changes detected)
i  functions: cleaning up build files...

✔  Deploy complete!

Intl.supportedOf is apparently now a built-in function of Node v18 and it would be preferable to be able to use this included function without needing to import more dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant