-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
[email protected] requires git installed, fails otherwise. #1210
Comments
suggest installing git on the server? root cause: https://github.com/sidorares/node-mysql2/blob/master/package.json#L54 was added recently @sidorares we could move the dependency to devDependencies, and rollup the typescript definition, if you like? I can help with a pull request for it |
yes, I think moving type definitions to dev dependency would be a good solution for this. Alternatively we could publish our own version of
yes, that would be great if you can help |
I am also facing this issue, it would be great if someone can find a solution for it |
Running into a few issues microsoft/rushstack#2220, types/mysql#20 |
Seems that the proper solution for any including of types/* package is to include as dev dependency which is only a package.json change. |
I don't think that would work, node-mysql2 must export the types to be available for projects using the typescript definitions |
removed comment |
cumbersome: yes, that's why this project started to move it into the package. Also see my suggestion above to rollup the definitions so there is no extra runtime or peer dependencies, and PR #1211 which contains a workaround by including the types in this project |
Actually, the original problem is that npm requires git in order to check out the types/mysql package. Since git is a valid dependency, the author of the issue should install git! Author is fine with 2.1.0 though. Should not rush bundling any types until the maintainer has figured out where he wants to go with that. |
I personally feel bundling types ( at least for now ) is better option, gives me a bit more freedom with adding/removing types and at not a big cost in terms of package size |
We are using docker,
I don't think we have done something very different from most people. |
@itsTeknas |
you beat me by 2 seconds @larshp :) |
I'm a bit lost here I'm afraid, I don't have much experience with creating ES6 modules (though plenty importing) but I'm trying to get types in 2.2.5 working in a node.js app. I use the following import:
And I'm using the following tsconfig.json:
For my own app, that is. And when I try to run the app after compiling with tsc, I get the following:
Tried a few combinations without any success. Any advice? |
@Bidthedog I suggest changing your compiler options to:
Thanks @sidorares and contributors/community for such a great package and fast development! |
The latest release works as expected |
Thanks @KiTiVi - I did a lot of reading / googling last night and I actually changed it to the following and things seem to be working fine:
Unfortunately a number of other things are broken in the app atm (I'm converting a fairly complex app from JS to TS) so I can't confirm that all the types are working for me yet... looking positive atm though :) I'll open another ticket if I hit any issues (and try to understand how the whole ecosystem sits together!). |
Our ci/cd failed because it seems like npm i --save [email protected] would fail if git is not installed on the server.
i have reverted back to 2.1.0 for now.
npm debug log for reference,
The text was updated successfully, but these errors were encountered: