这是indexloc提供的服务,不要输入任何密码
Skip to content

Unable to modify GC functions and deploy #705

@Loocos

Description

@Loocos

Bug report

  • Extension name: invertase/firestore-stripe-payments@0.3.[11-12]

Describe the bug

When modifying the code of the cloud function createCustomer (avoid creation of customer in stripe if already exist with the same email address).
When building and deploying I get this error:

Build failed: > prepare > npm run build > build > tsc -p tsconfig.build.json src/utils.ts(94,9): error TS2322: Type 'Response<Customer>' is not assignable to type 'null'. src/utils.ts(96,9): error TS2322: Type 'Customer' is not assignable to type 'null'. src/utils.ts(97,39): error TS18047: 'customer' is possibly 'null'. src/utils.ts(102,14): error TS18047: 'customer' is possibly 'null'. src/utils.ts(103,17): error TS18047: 'customer' is possibly 'null'. src/utils.ts(105,9): error TS18047: 'customer' is possibly 'null'. src/utils.ts(106,21): error TS18047: 'customer' is possibly 'null'. src/utils.ts(114,26): error TS18047: 'customer' is possibly 'null'. src/utils.ts(114,39): error TS18047: 'customer' is possibly 'null'. npm error code 2 npm error path /workspace npm error command failed npm error command sh -c npm run build npm error A complete log of this run can be found in: /www-data-home/.npm/_logs/2025-07-23T04_18_09_864Z-debug-0.log; Error ID: 49341d49

Also when openning the code editor on GCP, whatever file I open, everything is red (import issue).
I didn't had that issue on the version 0.3.10

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to Cloud Run functions in Google Cloud platform.
  2. Click on "ext-firestore-stripe-payments-createCustomer"
  3. Click on "Source" tab, then "Edit"
  4. Open utils.ts or index.ts in src folder.
  5. See all the import lines are showing error.
  6. Make a small change, then deploy.
  7. Deploy will fail.

Expected behavior

No red line when opening the source of cloud functions from the extension.
Be able to redeploy.

Screenshots

If applicable, add screenshots to help explain your problem.

Image

System information

  • OS: Windows 11
  • Browser: Chrome (up to date)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions