This seems like it can be a recent problem since there are new versions out for both node.js and nowjs. When trying to install nowjs on ubuntu 11.04 with node 0.7.0-pre and npm
sudo npm install now -g
I get
/bin/sh: node-waf: not found
and so make of node-proxy fails. Reinstalling node gets me nowhere. A little help please? I have tried #nowjs at freenode, but it is silent...
And yes, I have seen this question, but the answer doesn't make sense to me. node-waf is indeed missing, but how would running the same make install on node again remedy that?
Thanks in advance!
Try to install nodejs-dev. node-waf belongs to that package
I tried to install on a new Ubuntu VM and eventually discovered I needed a C++ compiler. This did the trick for me:
$ sudo apt-get install build-essential libssl-dev curl git core
$ npm install now
via How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).
Installing node-waf wasn't helping at all.
I simply upgraded my node version (from 0.4.4 into 0.6.2), problem was resolved!
node-waf got changed to node-gyp, node-waf wont be supported in windows.
Well. and now npm install nodejs-dev fail
Related
Not sure if related, but over the weekend I upgraded my OS to Big Sur version 11.1 and then when I began working one thing went wrong after another and now I can't use node or npm at all. I get the following message in zsh:
% node -v
zsh: killed node -v
And the following on bash
node -v
Killed: 9
I've tried to install different versions of node through n, which makes no difference.
How it got this way?
Prior to this issue (after my OS upgrade), I couldn't run npm install, and would get the following message:
Maximum call stack size exceeded
This seems to have been reported on this thread, but as of writing this there are no replies.
As the OP on that thread says, I tried installing npm v7, which initially did solve my problem with the npm install, however caused other issues on the project.
I then decided to use n to install the latest version of node and this caused the errors I have above.
Does anyone know what's going on and how to fix it?
Edit: I was forced to uninstall and reinstall node to be able to go back to work, which did solve it but I am leaving this thread up in case there is a better solution.
TLDR:
brew uninstall git
brew update
brew reinstall pcre2 gettext
brew install git
brew reinstall node
I'm sure there's a more surgical solution (e.g., maybe you don't need brew reinstall pcre2 gettext), but this ^^ worked for me. Below is the path I took:
Skimming some google results, seemed it was at least partly due to the new M1 silicon and the minor MacOS update to 11.2.2. Tried to brew update and got:
Error: Failure while executing; `git config --replace-all homebrew.analyticsmessage true` was terminated by uncaught signal KILL.
Which led me to this: https://github.com/Homebrew/brew/issues/10275#issuecomment-757351887. After doing these uninstall, reinstall, installs, I finished with a brew reinstall node and voilĂ ! Didn't need to uninstall node and install from scratch:
an#As-Air ~ % node -v
v15.11.0
TL;DR
The solution is to reinstall node and all its dependencies. Luckily, Homebrew offers a one-liner all-in-one solution:
brew reinstall $(brew deps node) node
Why?
I had followed #albielin and #Mariusz' solutions without success. I didn't yet want the #bgh's nuclear option to reinstall Homebrew with all its packages.
It seems in my case, the issue wasn't coming from those specific dependencies (pcre2 gettext openssl icu4c), but rather another one. No need to worry about git. But do reinstall all dependencies to be sure and avoid an endless trial-and-error with every one of them.
Had the same issue. Tried #albielin approach but it still didn't work for me. Ive took a look in the console and saw issues with openssl and icu4c when executing node --version and reinstalled both. Now it works.
So in addition to #albielin commands I did:
brew reinstall openssl
brew reinstall icu4c
I had the same issue. The answers above didn't work for me. Looking at the console while running node --version I found the error load code signature error 2 for file "node"
Reinstalling Homebrew as detailed in this Stack Overflow answer did it for me:
Run the official uninstall script: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Clean up: sudo rm -rf /opt/homebrew
Fresh install: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install node: brew install node
The node post-install process ran into a few issues due to symlinks that could not be overwritten. The advice given in this article helped me resolve this; a few sudo chown ... and brew link --overwrite node commands later node was successfully installed!
I'm a newbie and I stupidly uninstalled my version 5.6.0 npm without unistalling my nodejs (version 8.9.4). And when I tried to reinstall the npm, it appears "bash: /usr/bin/npm: No such file or directory". I'm using Ubuntu 16.04
Any suggestion will be helpful.
Thank you.
Try
sudo apt-get install nodejs
which might reinstall npm.
or download and run this script
https://www.npmjs.com/install.sh
or grab it from github
https://github.com/npm/npm
Having this issue when using npm install. (lots of other people had this issue aswell with other commands/tasks).
I'm adding this question as a reference to a solution that has already worked for quite a few people.
russfrisch commented 4 days ago:
I was experiencing this same issue. Changing in the version for
grunt-node-inspector to prepend a ">=" instead of a "~" got this to
work for me.
Link to github page where I found this solution.
On Ubuntu 16.04, what worked for me was upgrading node
updating nodejs on ubuntu 16.04
I am replicating solution from the above link below
To update, you can install n
sudo npm install -g n
Then just :
sudo n latest
or a specific version
sudo n 8.9.0
Then try and install
sudo npm install <package>
I'm trying to install PhantomJS v2.0.0 using npm and after trying a couple of methods I've not found a working solution...
On NPM the latest version is 1.9.16, so I've tried the following in my package.json:
"phantomjs": "https://github.com/ariya/phantomjs/archive/2.0.0.tar.gz"
This gives me an error because there isn't a package.json for this version in the github repo.
"phantomjs": "2.0.0"
This tells me there is no version with this number available.
Am I missing something here?
phantomjs-prebuilt was renamed from phantomjs and now additionally contains binaries for version 2.1+.
npm -g install phantomjs-prebuilt
The fork phantomjs2 is still available which contains version 2.0.
npm -g install phantomjs2
Keep in mind that not all platforms might be supported.
Phantomjs may be installed as a brew package. Confirm this:
brew ls | grep phantomjs
If you do have phantomjs installed as a brew package, you can easily uninstall it:
brew uninstall phantomjs
Then try rerunning npm install after updating your package.json for "2.0.0".
FYI: Please read semantic versioning: https://stackoverflow.com/a/22345808/3412545
I had troubles to install it via npm.
I decided to build it. I'm running Ubuntu 15.10.
First, check you have all the development packages installed :
sudo apt-get install build-essential g++ flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libpng-dev libjpeg-dev python libx11-dev libxext-dev
Then download the source code : https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.0.0-source.zip
And run :
cd phantomjs-2.0.0-source
sudo ./build.sh
It's a very long process to build it ! Be sure you know what you're doing.
npm install phantomjs-prebuilt try this for node users
I am trying to install GITLAB. I get this error executing "sudo gem install charlock_holmes --version '0.6.9'" (section Install Gems)
GEOGIT:/geogit/Administrative_Tools # sudo gem install charlock_holmes --version '0.6.9'
Building native extensions. This could take a while...
ERROR: Error installing charlock_holmes:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9 extconf.rb
checking for main() in -licui18n... no
which: no brew in (/usr/sbin:/bin:/usr/bin:/sbin)
checking for main() in -licui18n... no
***************************************************************************************
*********** icu required (brew install icu4c or apt-get install libicu-dev) ***********
***************************************************************************************
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby1.9
--with-icu-dir
--without-icu-dir
--with-icu-include
--without-icu-include=${icu-dir}/include
--with-icu-lib
--without-icu-lib=${icu-dir}/
--with-icui18nlib
--without-icui18nlib
--with-icui18nlib
--without-icui18nlib
Gem files will remain installed in /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9 for inspection.
Results logged to /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/gem_make.out
Someone, can help me debug those logs and error?
This looks like issue 1952
It was actually weirdness with the way my ubuntu VPS is commissioned. Mine did not come with a C compiler or libdev obviously.
The problem fix I found was to install libdev first, then the GCC
Then apt-get install libicu-dev.
Update 2015: additional comments include:
yum install libicu-devel worked for me
You just need to make sure "patch" is installed (yum install patch) then it should work
For MacOS install the following dependency:
brew install icu4c
According to the documentation (https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md) the package libicu-dev is required
Install it with "apt-get install libicu-dev" and then charlock_holmes could be installed
I used "yum install libicu-devel" and then I could install charlock_holmes
I got the same mistake on a Centos 5.4 server, the yum repository only have the icu version 3.6, so i have to search and install manually the library icu 4.2 which solve the problem. In case someone else need to know how to do it, i recommend to check this link http://source.icu-project.org/repos/icu/icu/tags/release-4-2-1/readme.html#HowToBuildUNIX
I had kind of the same problem: when I was trying to install charlock_holmes gem, I had this error:
charlock_holmes-0.7.3/mkmf.log
have_library: checking for main() in -licui18n... -------------------- no
I fixed it by running the first command of #VonC:
sudo apt-get install libicu-dev
Hope I helped someone!