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

Cannot deploy function when using shared ts module #1587

Open
Dzivo opened this issue Jul 31, 2024 · 3 comments
Open

Cannot deploy function when using shared ts module #1587

Dzivo opened this issue Jul 31, 2024 · 3 comments

Comments

@Dzivo
Copy link

Dzivo commented Jul 31, 2024

Related issues

[REQUIRED] Version info

node:

v20.14.0
firebase-functions:

firebase-tools:

13.14.2

firebase-admin:

12.1.0

[REQUIRED] Test case

[REQUIRED] Steps to reproduce

Run
firebase deploy --only functions:anyFunction

[REQUIRED] Expected behavior

Deploys a function

[REQUIRED] Actual behavior

code: 'MODULE_NOT_FOUND',

Were you able to successfully deploy your functions?

Error: Cannot find module 'mysharedmodule/models'

If needed i can append ts configs as well but it should be easy to test just create a project reference
https://www.typescriptlang.org/docs/handbook/project-references.html

@google-oss-bot
Copy link
Collaborator

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

@exaby73
Copy link
Contributor

exaby73 commented Aug 1, 2024

Hi @Dzivo. Can you provide a sample for me to test?

@exaby73 exaby73 added Needs: Author Feedback Issues awaiting author feedback and removed needs-triage labels Aug 1, 2024
@Dzivo
Copy link
Author

Dzivo commented Aug 2, 2024

@exaby73 i am swamped with work but you could just create 2 typescript projects in folder and add a reference from one to the other you can also us Paths to simplify imports as well

@google-oss-bot google-oss-bot added Needs: Attention and removed Needs: Author Feedback Issues awaiting author feedback labels Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants