Is makeNodeJsModule outdated on recent Node/NPM versions? #1043
Labels
No labels
dependencies
difficulty::high
difficulty::low
difficulty::medium
good first issue
help wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
justin/makes#1043
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@dsalaza4 I've been struggling to update a package using recent versions of NodeJs (18+) and NPM (9+).
My main problem is that peer dependencies are not being found in the local registry created by makes:
github.com/fluidattacks/makes@e8292670f4/src/args/make-node-js-modules/builder.sh (L24)Well reading at NPM changelog I saw that now peer dependencies are being installed locally as well, not only linked (like it used to be in NPM < 6) causing this kind of problem:
I tried to modify the codebase by removing the
--registryflag and the build was successful but the modules are not being cached, causing it to do a rebuild here every time.I've been looking for different solutions but I cannot find a way to deal with the peer dependencies without making the job to point to the remote registry. I've been reading about node2nix but it seems to not work with NodeJs 18+ yet.
Any suggestions here?
@dacevedo12 suggested taking a look at dream2nix.
This is also related to why sometimes you have to build a
package-lock.jsonusing the--legacy-peer-depsoption, which removes the installation of peer dependencies.If there are ways of integrating *2nix solutions so they do the heavy-lifting when it comes to providing specific lang packages, let's do that then!
Same issue here when trying to add a package
Same problem trying to build an application.

Any solution?
We're using node2nix now.
Only node 18 is supported.
Everything in universe builds properly with this approach.
dream2nix looks pretty much abandoned.
node2nix does not look very well maintained, we'll see how we like using it.
Maybe we'll end up deprecating
makeNodeJsModulesandmakeNodeJsEnvironmentas buildingnode_modulesvia nix derivations is just too complex.