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

[BUG]: Cannot find package 'lru-cache' imported from /var/task/node_modules/@octokit/auth-app/dist-node/index.js #2756

Closed
1 task done
gaomingzhao666 opened this issue Nov 10, 2024 · 4 comments
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@gaomingzhao666
Copy link

gaomingzhao666 commented Nov 10, 2024

What happened?

Hello, I am using Octokit to build my portfolio to show my repos from Github, and today I accessed the website that deployed on Vercel and I got the error info as the following:

[nuxt] [request error] [unhandled] [500] Cannot find package 'lru-cache' imported from /var/task/node_modules/@octokit/auth-app/dist-node/index.js

Here is my repo's link, I wrote all of the codes that depends on Octokit in the Server -> api -> repo folder

The error is shown in the Vercel log and it works properly locally, I have no idea about it, I tried to redeploy on Vercel but it doesn't work.

My Octokit version is 4.0.2. It works properly with this version in local. I would very much appreciate any help!!

Versions

Octokit version 4.0.2
NodeJS version 20.X LTS

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gaomingzhao666 gaomingzhao666 added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Nov 10, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@wolfy1339
Copy link
Member

This seems like a bug in vercel. We're using npm specifiers to use a fork of one of our dependencies,
https://github.com/octokit/auth-app.js/blob/70e2904e2f1d5004e12c685ef86276f0e3a0936d/package.json#L34

make sure that vercel resolves that package to the correct one

@gaomingzhao666
Copy link
Author

This seems like a bug in vercel. We're using npm specifiers to use a fork of one of our dependencies, https://github.com/octokit/auth-app.js/blob/70e2904e2f1d5004e12c685ef86276f0e3a0936d/package.json#L34

make sure that vercel resolves that package to the correct one

Thank you so much sir, I have reported it to Vercel Community. (●'◡'●)

@gaomingzhao666
Copy link
Author

The issue was solved by installing @octokit/core instead of octokit.js, I do not know why it happened and where the problem should be addressed.

I found the issue but regenerate lockfile or redeploy project can not handle this.

The codes that explicitly point out the lost file path as following:

  // relate to issue https://github.com/nuxt/nuxt/issues/22325#issuecomment-1690421926
  nitro: {
    externals: {
      traceInclude: []
    }
  },

However I did not find the lost folder called auth-app in node_modules.

@gaomingzhao666 gaomingzhao666 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Active Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
Archived in project
Development

No branches or pull requests

2 participants