I need componentjs to build a javascript library taken from github.
Then I installed Node.js for Windows 64bits, and when I try to install componentjs or component-builder, I get the following errors that I don't understand:
C:\Users\Kevin>npm install component
npm WARN `git config --get remote.origin.url` returned wrong result (git://githu
b.com/ariya/esprima.git) undefined
npm WARN `git config --get remote.origin.url` returned wrong result (git://githu
b.com/ariya/esprima.git) undefined
npm ERR! git clone git://github.com/ariya/esprima.git undefined
npm ERR! git clone git://github.com/ariya/esprima.git undefined
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "component"
npm ERR! cwd C:\Users\Kevin
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ENOGIT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Kevin\npm-debug.log
npm ERR! not ok code 0
Does anyone know what I'm doing wrong?
Problem solved, thanks to CD..
Just install msysgit (git for windows).
During the installation, it's prompted if you want to automatically add git to your PATH environment variable.
Related
I entered npm install nodegit and got the following error
npm ERR! Linux 3.10.0-514.2.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "install" "nodegit"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! path /opt/portal_server/node_modules/nodegit
npm ERR! code EISGIT
npm ERR! git /opt/portal_server/node_modules/nodegit: Appears to be a git repo or submodule.
npm ERR! git /opt/portal_server/node_modules/nodegit
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/portal_server/npm-debug.log
Could you please suggest a way to resolve this error?
Try running this
sudo rm -rf node_modules/*/.git/
Then try installing nodegit
Running npm install #google-cloud/speech gives:
npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/google-cloud/speech)
npm WARN `git config --get remote.origin.url` returned wrong result (git#github.com:google-cloud/speech)
npm ERR! git clone git#github.com:google-cloud/speech Cloning into bare repository 'C:\Users\Animesh\AppData\Roaming\npm-cache\_git-remotes\git-github-com-google-cloud-speech-00c2e0cb'...
npm ERR! git clone git#github.com:google-cloud/speech Host key verification failed.
npm ERR! git clone git#github.com:google-cloud/speech fatal: Could not read from remote repository.
npm ERR! git clone git#github.com:google-cloud/speech
npm ERR! git clone git#github.com:google-cloud/speech Please make sure you have the correct access rights
npm ERR! git clone git#github.com:google-cloud/speech and the repository exists.
npm ERR! addLocal Could not install google-cloud/speech
npm ERR! Error: ENOENT, stat 'E:\WebstormProjects\live-delfoi-speech-demo\google-cloud\speech'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "#google-cloud/speech"
npm ERR! cwd E:\WebstormProjects\live-delfoi-speech-demo
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! path E:\WebstormProjects\live-delfoi-speech-demo\google-cloud\speech
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! E:\WebstormProjects\live-delfoi-speech-demo\npm-debug.log
npm ERR! not ok code 0`
The official documentation say that I have the use that same command to install the specified version.
How can I correct it?
UPDATE
I noticed that the git repository has been moved to https://github.com/GoogleCloudPlatform/google-cloud-node.
This is because of your node version. You need to upgrade your node from 0.10 to some latest and stable version.
I have complete project in Visual Studio and I want it wrap to PhoneGap. I can't install PhoneGap, when I am writing to command line this: npm install -g phonegap, so I get this:
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodeJs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Users\Marek
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ENOGIT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Marek\npm-debug.log
npm ERR! not ok code0
I installed Git GUI in: C:\Users\Marek, but still doesn't work.
You have to install git the command line version to do this. The GUI version(I don't know which one that is) probably won't work. Get it from here: http://git-scm.com/
You should be able to type git and not get an error on the command line before you use npm
I don't know what I did wrong, but trying to install a module using npm returns errors. My concrete example (same results, no matter which module I would like to install):
npm install socket.io
Returns:
npm ERR! TypeError: Cannot call method 'replace' of undefined
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:332:45
npm ERR! at fs.js:117:20
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:53:5
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:62:5
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /Users/Hassen/www/node/btask
npm ERR! node -v v0.8.16
npm ERR! npm -v 1.1.69
npm ERR! type non_object_property_call
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/Hassen/www/node/btask/npm-debug.log
npm ERR! not ok code 0
Any idea? Thanks in advance :)
This error is usually caused by a .git directory in current directory on which no commit has been made.
Either remove the directory or make at least one commit before trying npm again.
EDIT: From this npm issue page;
This issue has been fixed in the latest release. Please update to the latest node and npm (v0.8.17 and v1.2.0, respectively)
Here is my node and npm version:
node -v v0.4.11
npm -v 1.0.27
When I tried to install a module for example express, I get the following error:
[root#localhost npm]# npm install express
npm ERR! Error: First argument needs to be a number, array or string.
npm ERR! at new Buffer (buffer.js:156:15)
npm ERR! at regRequest (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:82:17)
npm ERR! at GET (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:211:3)
npm ERR! at get_ (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:121:3)
npm ERR! at /usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:46:10
npm ERR! at cb (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:37:9)
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Linux 2.6.40.3-0.fc15.i686.PAE
npm ERR! command "node" "/usr/local/bin/npm" "install" "express"
npm ERR! cwd /home/kelvin/Downloads/npm
npm ERR! node -v v0.4.11
npm ERR! npm -v 1.0.27
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/kelvin/Downloads/npm/npm-debug.log
npm not ok
Looks like your auth is set to something that doesn't work. Not clear how that happened -- perhaps check your /home/kelvin/.npmrc for a stray config? Shooting in the dark a bit. I would try npm mailing list if you don't find something in the rc.
https://github.com/isaacs/npm/issues/1372#issuecomment-2036919
isaacs: "The master branch from git is often unstable. This is fixed in HEAD already."
Solved after git pull, and make install.