-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
building npm: Yell if you try to package npm@3 with npm@2
npm@2's packager can't handle npm@3's bundled node_modules, so you either have to use a version that we've built for you (eg one published to the registry) or use the one that you're building.
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
npmver=$(perl -E "say q{$npm_config_user_agent} =~ m{/(\S+)}") | ||
|
||
if semver -r ^3.0.0-0 $npmver > /dev/null; then | ||
echo "Packaging with $npmver" | ||
else | ||
echo "[0;41;4mPackaging or installing [1mnpm@$npm_package_version[22m with [1mnpm@$npmver[22m is impossible.[0m" 1>&2 | ||
echo "[0;41;3mPlease install [1mnpm@^3.0.0-0[22m from the registry and use that or run your command with[0m" 1>&2 | ||
echo "[0;41;3mthis version of npm with:[0m" 1>&2 | ||
npmargs=$(node -e "a=$npm_config_argv; console.log(a.original.join(' '))") | ||
echo "[1m $npm_node_execpath $PWD $npmargs[0m" 1>&2 | ||
exit 1 | ||
fi |