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

master branch build broken: 'npm i knex/knex@master' does not work #5184

Closed
xJonahS opened this issue May 17, 2022 · 13 comments
Closed

master branch build broken: 'npm i knex/knex@master' does not work #5184

xJonahS opened this issue May 17, 2022 · 13 comments

Comments

@xJonahS
Copy link

xJonahS commented May 17, 2022

Environment

Knex version: current master branch
OS: Windows

Bug

  1. Cant install from newer commits after Tag 2.0.0. Seems to be broken after dependerBot.

  2. Error message

npm i knex/knex#2.0.0
image
this works.

npm i knex/knex#master
image
this does not work anymore.

I will try to update you, which commit is causing this issue. My first assumption is the dependerBot. Thanks in advance 👍

@kibertoad
Copy link
Collaborator

@code-ape Looks like some OS-dependent code ended up leaking into your PR after all. Could you take a look?

@kibertoad
Copy link
Collaborator

kibertoad commented May 17, 2022

@xJonahS Fairly sure it's #5144

@code-ape
Copy link
Collaborator

code-ape commented May 17, 2022

@kibertoad it was caused by #5151 and is this single line in package.json. Intention was that when developers ran npm install while working on Knex it would automatically build the Typescript files. This was a mistake and it should be a husky for the git hook post-checkout. Will open a PR momentarily to fix.

"postinstall": "npm run clean && npm run build"

@code-ape
Copy link
Collaborator

Hey @xJonahS can you confirm that your issue with master is now resolved after my fix was merged? Thanks!

@xJonahS
Copy link
Author

xJonahS commented May 18, 2022

@code-ape Thank you for the fast response. The Issue does not seem to be resolved in my case. I get the same error message and I can see your newly added husky command in the error message. Hope this helps in finding the issue!

image

@code-ape
Copy link
Collaborator

code-ape commented May 18, 2022

  1. @kibertoad please re-open 😞
  2. Ok, @xJonahS, the PR Fix #5184, ensure Typescript developer experience doesn't influence user experience #5185 did fix a lot of things but I apparently have massively underestimated the amount of magic that NPM does when installing from a git repo. I think I have a fix and it "works for me" on an Ubuntu VM. Can you please try npm install "code-ape/knex#test-git-install" and report back if it works or not? If it does then I'll submit a PR to finally fix the last part of this!

@xJonahS
Copy link
Author

xJonahS commented May 18, 2022

@code-ape I tested the given npm install after using npm cache clear --force and i still get the same error message☹ (on Win10)

image
2022-05-18T12_24_03_715Z-debug.log

@code-ape
Copy link
Collaborator

Ok, I've got it working for Linux and MacOS and found why it's failing on Windows. Have to go do work stuff now but will get in a final fix this evening!

@xJonahS
Copy link
Author

xJonahS commented May 18, 2022

Thank you! Good luck with your work stuff 👍

@code-ape
Copy link
Collaborator

Ok, @xJonahS, I have pushed again to my branch and appeal to have fixed that final windows issue. There's now a CI test that verifies this. Can you try again with that same npm install "code-ape/knex#test-git-install" --no-cache --verbose and confirm?

@xJonahS
Copy link
Author

xJonahS commented May 19, 2022

@code-ape I can confirm that the install on windows is working again! 👍

@code-ape
Copy link
Collaborator

Thanks for working with me on this @xJonahS! That branch you tested has been merged into Knex master branch (1baeefe) so your problem should now be resolved 😄

@OlivierCavadenti
Copy link
Collaborator

thanks @code-ape , so I close this one.

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