-
Notifications
You must be signed in to change notification settings - Fork 960
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
Deploy analysis error when importing octokit/rest #8100
Comments
Hey @larssn, thanks for the detailed report. I'm trying to replicate the error you mentioned using the steps provided, but so far no errors are being raised when running I created this repo using the information provided. The repo has a single Also, looking up the error message, it seems like it's coming from |
Could it be that it's because octokit uses ES modules, and our project still uses CJS? Using your repo, I manage to get it to output this error, after switching it to CJS:
I wonder why the error in my project isn't like that though. |
Could you share a minimal repro or the code that is giving you this error? @aalej was able to deploy functions with Octokit imported, so I suspect this error is coming from somewhere else in the code (probably a repeat call to initializeApp()) |
[REQUIRED] Environment info
firebase-tools: 13.29.1
Platform: macOS
[REQUIRED] Test case
Add
import { Octokit } from '@octokit/rest'
to your index.ts[REQUIRED] Steps to reproduce
npm install @octokit/rest
import { Octokit } from '@octokit/rest'
An error will be thrown:
Now remove the import and try again.
It should deploy successfully.
[REQUIRED] Expected behavior
I expect Octokit to be usable.
[REQUIRED] Actual behavior
I think this is a false positive of the code analysis algorithm that runs before deployment.
The text was updated successfully, but these errors were encountered: