Merge pull request #6215 from valeriangalliat/npm-engine-fix
Patch npm packages to ignore npm requirements
This commit is contained in:
commit
168b7bee6f
@ -83,6 +83,9 @@ let
|
|||||||
# Some version specifiers (latest, unstable, URLs, file paths) force NPM
|
# Some version specifiers (latest, unstable, URLs, file paths) force NPM
|
||||||
# to make remote connections or consult paths outside the Nix store.
|
# to make remote connections or consult paths outside the Nix store.
|
||||||
# The following JavaScript replaces these by * to prevent that:
|
# The following JavaScript replaces these by * to prevent that:
|
||||||
|
# Also some packages require a specific npm version because npm may
|
||||||
|
# resovle dependencies differently, but npm is not used by Nix for dependency
|
||||||
|
# reslution, so these requirements are dropped.
|
||||||
|
|
||||||
(
|
(
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@ -131,6 +134,11 @@ let
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ignore npm version requirement */
|
||||||
|
if(packageObj.engines) {
|
||||||
|
delete packageObj.engines.npm;
|
||||||
|
}
|
||||||
|
|
||||||
/* Write the fixed JSON file */
|
/* Write the fixed JSON file */
|
||||||
fs.writeFileSync("package.json", JSON.stringify(packageObj));
|
fs.writeFileSync("package.json", JSON.stringify(packageObj));
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user