Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
npm successfully installed -- via hacking install.sh
I tried to install npm via pkgsrc but got the error listed below and a 0B node.core file.
<snip>
PKG_CONFIG_PATH= CWRAPPERS_CONFIG_DIR=/usr/pkgsrc/lang/npm/work/.cwrapper/config node bin/npm-cli.js install /usr/pkgsrc/lang/npm/work/marked-0.6.0 --no-global --no-timing --no-save
[1] Segmentation fault /usr/bin/env USE...ng /usr/pkgsrc/lang/npm/work/.home/.npm/_locks/staging-b2d0450
*** Error code 139
Stop.
make[1]: stopped in /usr/pkgsrc/lang/npm
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/lang/npm
The first mention of a npm build issue is here: http://mail-index.netbsd.org/pkgsrc-users/2018/10/16/msg027550.html
BUT! I did get it to install, although I get the same empty node.core file when I use npm. Here what I did.
1. cd /usr/pkgsrc/lang/npm
2. sudo make configure.
3. cd /usr/pkgsrc/lang/npm/work/cli-6.8.0/scripts
4. There you find install.sh. Executing that fails because it does some tar commands with invalid (UNIX) flags.
5. Below is the diff from my hacking around to make it work, which it did.
~/nowhere> diff install.sh nb_npm_install.sh
11c11
< # https://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html
---
> # http://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html
21c21,30
< curl -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh
---
> # curl -f -L -s https://www.npmjs.org/install.sh > npm-install.sh
> # ret=$?
> # if [ $ret -eq 0 ]; then
> # (exit 0)
> # else
> # rm npm-install.sh
> # echo "Failed to download script" >&2
> # exit $ret
> # fi
> sh npm-install.sh
23,32c32
< if [ $ret -eq 0 ]; then
< (exit 0)
< else
< rm npm-install-$$.sh
< echo "Failed to download script" >&2
< exit $ret
< fi
< sh npm-install-$$.sh
< ret=$?
< rm npm-install-$$.sh
---
> rm npm-install.sh
102c102
< $tar --version
---
> # $tar --version
Ron Georgia
“90% of my problems are due to ignorance, the other 10% is because I just don’t know any better.”
Home |
Main Index |
Thread Index |
Old Index