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]: tsp-toolkit depends on private repos, building impossible. #16

Open
2 of 3 tasks
956MB opened this issue Apr 29, 2024 · 6 comments
Open
2 of 3 tasks

[Bug]: tsp-toolkit depends on private repos, building impossible. #16

956MB opened this issue Apr 29, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@956MB
Copy link

956MB commented Apr 29, 2024

Tracking

  • Add more contributing documentation

Pre-check

  • I have searched the existing issues and discussions to make sure my problem has not already been addressed.
  • I have looked at the "Known Issues" Section of the marketplace page of all TSP Toolkit extensions.

This project's dependencies currently contains three private repos, @tektronix/keithley_instrument_libraries, @tektronix/kic-cli, and @tektronix/web-help-documents, making work on the extension impossible.

  • macOS Sonoma 14.4.1 (23E224)
  • Node v18.17.1
  • pnpm v9.0.6
  • tsp-toolkit commit e1f6d57

TSP Toolkit Version

0.15.0

TSP Toolkit Develop Version

0.15.0

Steps to Reproduce

  1. Fork tsp-toolkit
  2. Clone (git clone https://github.com/956MB/tsp-toolkit.git)
  3. Run pnpm install:
 ERR_PNPM_FETCH_401  GET https://npm.pkg.github.com/@tektronix%2Fkeithley_instrument_libraries: Unauthorized - 401
  1. Delete "@tektronix/web-help-documents": "0.15.0", from package.json
  2. Run pnpm install again:
 ERR_PNPM_FETCH_401  GET https://npm.pkg.github.com/@tektronix%2Fweb-help-documents: Unauthorized - 401
  1. Delete "@tektronix/kic-cli": "0.15.1", from package.json
  2. Run pnpm install again:
 ERR_PNPM_FETCH_401  GET https://npm.pkg.github.com/@tektronix%2Fweb-help-documents: Unauthorized - 401
  1. Delete last line "@tektronix/keithley_instrument_libraries": "0.15.0", from package.json
  2. Running pnpm install this last time installs fine with no errors, but then obviously we don't have the packages needed for COMMAND_SETS and EXECUTABLE in src/extension.ts, and elsewhere:
import { COMMAND_SETS } from "@tektronix/keithley_instrument_libraries"
import { EXECUTABLE } from "@tektronix/kic-cli"

// ├╴E  Cannot find module '@tektronix/keithley_instrument_libraries' or its corresponding type declarations. typescript (2307) [5, 29]
// ├╴E  Cannot find module '@tektronix/kic-cli' or its corresponding type declarations. typescript (2307) [6, 27]
@956MB 956MB added bug Something isn't working triage This issue needs to be triaged by the development team. labels Apr 29, 2024
@esarver
Copy link
Member

esarver commented Apr 30, 2024

@956MB Thank you so much for the issue! We appreciate the contribution!

I just checked and all those repos and packages are set to public visibility. I am not familiar with pnpm, but we do define the @tektronix scope in the .npmrc file in the project root. I'm not sure if pnpm respects that file.

@esarver
Copy link
Member

esarver commented Apr 30, 2024

Just tried npm ci on my personal laptop and got the same issue. I think you need to set up authentication to use the GitHub npm registry (see https://stackoverflow.com/a/61666885 for more info). You'll just need to create a GitHub PAT to use for that authToken. We do plan to add a better Contributing document in the future.

@esarver
Copy link
Member

esarver commented Apr 30, 2024

In my work .npmrc file, I have something like

//npm.pkg.github.com/:_authToken=GITHUB_PAT

Where GITHUB_PAT is the literal PAT generated by GitHub.

@956MB
Copy link
Author

956MB commented Apr 30, 2024

Yeah I reached the same conclusion and was finally able to get through. I was just about to comment the same thing 👍 👍 A note about having the right env variable with the PAT set would probably be best. Edit: unless it was on me not having an up to date token with permissions... :|

@esarver
Copy link
Member

esarver commented Apr 30, 2024

unless it was on me not having an up to date token with permissions...

I think it is on us for not having better developer docs. It's in the works, but I'm glad that you submitted this issue so we would know to state it explicitly!

@esarver esarver removed the triage This issue needs to be triaged by the development team. label Apr 30, 2024
@esarver
Copy link
Member

esarver commented May 13, 2024

Internal reference: TSP-663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants