Skip to content

package.json typesVersions contains start slash for some providers #1266

Closed
@leon

Description

@leon

Related issues

[REQUIRED] Version info

4.0.0

node:16.10.0

firebase-functions: 4.0.0

firebase-tools:

firebase-admin:11.2.0

[REQUIRED] Test case

Before I could import ObjectMetadata by using import { ObjectMetadata } from 'firebase-functions/lib/providers/storage'

but in 4.0.0 it's gone (which is good, never liked to do deep imports)

I looked at the package.json of 4.0.0 and It should be possible to import via the firebase-functions/v1/storage
but If you look at a couple of the paths are wrong.

remoteConfig
storage
tasks
testLab

contain a / in the beginning, whilst all others don't
I think this is what is causing the problem.

"v1/firestore": [
  "./lib/v1/providers/firestore"
],
"v1/pubsub": [
  "./lib/v1/providers/pubsub"
],
"/v1/remoteConfig": [
  "./lib/v1/providers/remoteConfig"
],
"/v1/storage": [
  "./lib/v1/providers/storage"
],
"/v1/tasks": [
  "./lib/v1/providers/tasks"
],
"/v1/testLab": [
  "./lib/v1/providers/testLab"
**],**

[REQUIRED] Steps to reproduce

[REQUIRED] Expected behavior

to be able to import from

import { ObjectMetadata } from 'firebase-functions/v1/storage'

[REQUIRED] Actual behavior

to get it to work know I need to add a double / at the beginning

import { ObjectMetadata } from 'firebase-functions//v1/storage'

Were you able to successfully deploy your functions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions