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]: Error when importing react component with octokit dependency #2447

Closed
1 task done
rwxmad opened this issue May 13, 2023 · 6 comments
Closed
1 task done

[BUG]: Error when importing react component with octokit dependency #2447

rwxmad opened this issue May 13, 2023 · 6 comments
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@rwxmad
Copy link

rwxmad commented May 13, 2023

What happened?

I have a react+typescript component that has an octokit dependency.

import React, { FC, useEffect, useState } from "react";
import { Octokit } from "octokit";

export const Graph: FC<IProps> = ({ token, theme }) => {...code}

Project structure:

.
├── example
  ├── public
    └── index.html
  ├── src
    ├── App.tsx
    ├── index.css
    └── index.tsx
  ├── .gitignore
  ├── package-lock.json
  ├── package.json
  ├── README.md
  └── tsconfig.json
├── lib
  ├── components
    ├── Graph.d.ts
    └── Graph.js
  ├── index.d.ts
  └── index.js
├── src
  ├── components
    └── Graph.tsx
  └── index.tsx
├── .gitignore
├── package-lock.json
├── package.json
└── tsconfig.json

I use tsc to build everything from src to the lib folder, and in the example folder I created a project using create-react-app, where I import the component from lib/index.js, which was compiled with tsc. But when I run the application in the folder example produces an error:

Failed to parse source map from '/Users/rwxmad/code/github/react-github-contribution-graph/node_modules/@octokit/auth-app/dist-node/index.js.map' file: Error: ENOENT: no such file or directory, open '/Users/rwxmad/code/github/react-github-contribution-graph/node_modules/@octokit/auth-app/dist-node/index.js.map'

How to fix that error?

Versions

Octokit v2.0.14
NodeJs v19.8.1

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rwxmad rwxmad added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels May 13, 2023
@wolfy1339
Copy link
Member

Duplicate of octokit/auth-app.js#474

@wolfy1339 wolfy1339 closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2023
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Active May 13, 2023
@rwxmad
Copy link
Author

rwxmad commented May 17, 2023

@wolfy1339 still not working, how to fix?

@wolfy1339
Copy link
Member

Can you share the versions for All Octokit modules installed?

The ones listed in your lock file

@rwxmad
Copy link
Author

rwxmad commented May 17, 2023

Can you share the versions for All Octokit modules installed?

The ones listed in your lock file

https://github.com/rwxmad/react-github-contribution-graph/blob/main/package-lock.json

Installed via npm i octokit

@wolfy1339
Copy link
Member

I believe in this case, it would be octokit/request.js#584 that is now blocking you

@rwxmad
Copy link
Author

rwxmad commented May 17, 2023

I believe in this case, it would be octokit/request.js#584 that is now blocking you

Thank you for your help, I'll be waiting then

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