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] unable to install dev dependency TypeStrong / fs-fixture-builder #2171

Closed
swordensen opened this issue Feb 16, 2023 · 8 comments
Closed

Comments

@swordensen
Copy link
Contributor

Search terms

fs-fixture-builder

Expected Behavior

I expect to be able to install fs-fixture-builder so I can run tests before submitting a PR :)

Actual Behavior

Typedoc does nothing wrong except when installing I get this error:

image

Even if the commit hash worked because the devs of fs-fixture-builder have their /dist folder in the .gitignore file I'm not even sure anything would pop up if we could install it lol.

Steps to reproduce the bug

simply clone typedoc and try to run npm install

Environment

  • Typedoc version: 0.23.25
  • TypeScript version: 4.9.5
  • Node.js version: 16.19.0
  • OS: Windows
@swordensen swordensen added the bug label Feb 16, 2023
@swordensen
Copy link
Contributor Author

If you want to wait on resolving this I'm working on making a PR that adds fs-fixture-builder as a local dependency in the test folder and point it at that instead since that repo seems pretty broken. (I can't get either the src folder or dist folder when i npm install it)

I figure this is an acceptable solution since typedoc is pointing at a specific commit anyways but, let me know if you disagree!

@Dayday10
Copy link

Why is the dev dependency not installing?

@swordensen
Copy link
Contributor Author

Why is the dev dependency not installing?

From my research I believe it is because fs-fixture-builder only included the /dist folder when installing from npm (specifically on the commit that TypeDoc uses)

see files property on the package.json https://github.com/TypeStrong/fs-fixture-builder/blob/5a9486bc66f6e36988106685768396281f6cbc10/package.json

but, the /dist folder is also .gitignored https://github.com/TypeStrong/fs-fixture-builder/blob/5a9486bc66f6e36988106685768396281f6cbc10/.gitignore

I think it was intended that when it is installed the "prepare" script would run and generate the dist folder when the package as installed but, since the /src folder is not included under files in package.json we don't get it when we install it via npm.

This has been updated see https://github.com/TypeStrong/fs-fixture-builder/blob/main/package.json

But, I still don't get either folder when installing even from the latest commit so NPM might be cacheing some rules or something. I'm not entirely sure.

Either way, judging from the commit history, it seems like fs-fixture-builder has struggled with this way of distributing the code. So I'm thinking that putting a local version in TypeDoc would be a solution until that's figured out. And then you guys (or I idk I'm new here lol) can run the tests before approving PRs in the CI/CD pipeline.

Sorry probably more than you asked for.

Were you able to re-create the issue?

@swordensen
Copy link
Contributor Author

i'm going to try cloning and installing on my linux laptop see if it makes a difference

@Dayday10
Copy link

Dayday10 commented Feb 16, 2023 via email

@swordensen
Copy link
Contributor Author

well I'm not so sure about that lol.

it seemed to install correctly on my linux machine. Now I am thinking it's a networking issue on my end :/

going to close this for now

@tintinthong
Copy link

I experience this issue to

@tintinthong
Copy link

For those of you who have faced this issue, the main reason is that prepare script is not being run when npm install of github repo.

Here is the relating issue
Here is the comment that fix. TLDR upgrade to npm@8.5.2 and above

@Gerrit0 Gerrit0 removed the bug label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants