Open ursi opened 3 years ago
For me, a patch like this, seems to work
+++ b/nix/node-env.nix
@@ -135,6 +135,9 @@ let
function replaceDependencies(dependencies) {
if(typeof dependencies == "object" && dependencies !== null) {
for(var dependency in dependencies) {
+ if (dependencies[dependency].startsWith("npm:")) {
+ dependency = dependencies[dependency].substring(4).split("@")[0];
+ }
var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency);
if(resolvedVersion === null)
There are 2 PRs for introducing npm: aliases, but the problem is that they extend the functionality on the wrong level causing them also to be used as version specifiers.
The proper solution is to change the functionality that treats all package specifiers as dependency specifiers, and interpret the aliases there.
2024 now, can not use @vue/language-service because it use npm:...
.
This dependency would not get picked up for me.
When I run
node2nix -l package-lock.json
on thispackage.json
after generatingpackage-lock.json
usingnpm i
then run
nix-build -A nodeDependencies
, theresult/lib/node_modules
folder is not made. If other dependencies are added, thenode_modules
folder will be in the derivation, and contain everything exceptlatest-snabbdom-release
.