Open mStirner opened 2 months ago
npm ERR! ../nxt_napi.h:20:2: error: #error "libunit version mismatch." npm ERR! 20 | #error "libunit version mismatch." npm ERR! | ^~~~~
In simple terms this means the version of unit-http you're trying to build/install is from a different version of unit to what you're trying to build/install against.
The check it's failing on is
#if NXT_VERNUM != NXT_NODE_VERNUM
#error "libunit version mismatch."
#endif
from src/nodejs/unit-http/nxt_napi.h
These versions essentially come from the version
file in the
repository root.
However seeing as you installed unit via your package manager you'd either need to install the nodejs language module likewise, or build it from the Unit source having checked out the version that matches what you have installed.
Any reason not to just use the packaged module though?
Im not sure if i understand correctly.
I have unit installed via apt. Followed the install steps for the unit-http module.
Is there a version relationship between the unit-http npm module & unit/unit-dev from apt? What version do i need to change (to what) that i can build the unit-http module?
I have unit v1.32.1 installed. The latest release of unit-http
is v1.32.0.
Would it work if both versions match?
Any reason not to just use the packaged module though?
What module are you meaning?
To clarify things: I just copy & pasted all your installation guide's.
I do not want to use any specific version or any other kind of special case. Just wanted to start as easy as possible.
I have unit v1.32.1 installed. The latest release of
unit-http
is v1.32.0.
Would it work if both versions match?
Yes, they both need to be the same version.
So it broke before because
NXT_VERNUM is 13201 and NXT_NODE_VERNUM is 13200
What module are you meaning?
Hmm, so there is no nodejs module package...
Yes, they both need to be the same version.
Ok, now i understand.
Any reason there is not a unit-http v1.32.1 module in the npm registry?
There should also be a note on the docs (https://unit.nginx.org/installation/#node-js) that the unit & unit-http module need matching version numbers.
Any reason there is not a unit-http v1.32.1 module in the npm registry?
Not sure, probably an oversight, maybe @tippexs or @thresheek knows?
There should also be a note on the docs (https://unit.nginx.org/installation/#node-js) that the unit & unit-http module need matching version numbers.
Indeed, that vital bit of information does seem to be missing... (I'll open a unit-docs issue for it)
I have freshly installed, unit & unit-dev via apt on my ubuntu 22.04.4. When i run
npm install -g --unsafe-perm unit-http
i get a "libunit version mismatch":Followed the install steps: https://unit.nginx.org/installation/#node-js
node.js version: v20.11.1 npm version: v10.2.4 os version: Ubuntu 22.04.4 LTS node-gyp version: v10.1.0
How can i fix this/install
unit-http
& why does it not download a pre-compiled version from npm?Thanks in advance