npm err code eisdir errno -4068 whenever installing any package - node.js

I followed this guide to install node to my machine without having admin rights.
I put node.exe, (npm.cmd and node_modules ) both from the npm zip in C:\Users\rakibler\Node. I added that to my path. I ran npm install -g bower and got
npm ERR! Error: EISDIR, open 'C:\Users\rakibler\Node\bower'
npm ERR! at Error (native)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Users\\rakibler\\Node\\\\node.exe" "C:\\Users\\rakibler\\Node\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "bower"
npm ERR! cwd C:\Users\rakibler
npm ERR! node -v v0.12.7
npm ERR! npm -v 1.4.9
npm ERR! path C:\Users\rakibler\Node\bower
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\rakibler\npm-debug.log
npm ERR! not ok code 0
at the end. It also seems like something else is wrong, because everything it downloads goes to C:\Users\rakibler\Node instead of C:\Users\rakibler\Node\node_modules. Not sure what's going wrong here. Any idea?

i think you need to install the npm globlally using
"npm install -g npm"
and then use it in directory to install bower . i hope this will solve your issue

Related

npm install cube Error: No dist in websocket-server package

Ubuntu 14.04 with newly installed nodejs npm mongodb
Install cube by npm install cube and it throws the errors:
npm ERR! Error: No dist in websocket-server package
npm ERR! at next (/usr/share/npm/lib/cache.js:746:26)
npm ERR! at /usr/share/npm/lib/cache.js:739:5
npm ERR! at RegClient.get_ (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:105:14)
npm ERR! at RegClient.<anonymous> (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:41:12)
npm ERR! at fs.js:268:14
npm ERR! at /usr/lib/nodejs/graceful-fs/graceful-fs.js:103:5
npm ERR! at Object.oncomplete (fs.js:107: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 Linux 3.13.0-32-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/me/cube
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/me/cube/npm-debug.log
npm ERR! not ok code 0
I've tried sudo npm install cube, but it doesn't work too.
I've search the error info by google and sf, I got nothing.
I've found the error:
the official source is not available:
https://www.npmjs.com/package/websocket-server
It's seems the developer's website is closed...
I found the solution by browse the ResqueBoard Issues
Try this:
cd node_modules/
git clone https://github.com/miksago/node-websocket-server
mv node-websocket-server websocket-server
cd..
npm install cube
use the node-websocket-server to replace websocket-server.

Trying to install yo with npm on Windows

I am on Windows and am trying to follow the instructions at http://yeoman.io/learning/index.html. So far I have successfully installed grunt-cli and bower but when I try to install yo using the following command...
npm install -g yo
...the command prompt returns this:
> spawn-sync#1.0.11 postinstall C:\Users\Aaron\AppData\Roaming\npm\node_modules\yo\node_modules\cross-spawn\node_modules\spawn-sync
> node postinstall
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! file ;C:\Windows\system32\cmd.exe
npm ERR! path ;C:\Windows\system32\cmd.exe
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn ;C:\Windows\system32\cmd.exe
npm ERR! spawn-sync#1.0.11 postinstall: `node postinstall`
npm ERR! spawn ;C:\Windows\system32\cmd.exe ENOENT
npm ERR!
npm ERR! Failed at the spawn-sync#1.0.11 postinstall script 'node postinstall'.
npm ERR! This is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node postinstall
npm ERR! You can get their info via:
npm ERR! npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Aaron\AppData\Roaming\npm\node_modules\npm-debug.log
Does anyone have any idea what the hell this means and how I can fix it?
You can try with this : https://github.com/npm/npm/issues/7781
I think this will helps you to solve your question.
And to get node & npm in cmd. You can set node location in windows environment variable. Then restart your cmd & try again to do this.
Try re-installing the setup with feature npm package manager and then get back to your npm install.

npm unable to install dependencies

I'm trying to install some npm modules and all goes fine until I try to install the dependencies of the installed modules. npm shows this log:
$ sudo npm install -g
npm ERR! addLocal Could not install .
npm ERR! Error: ENOENT, open 'package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/roemerbakker
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.21
npm ERR! path package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/roemerbakker/npm-debug.log
npm ERR! not ok code 0
$
Also tried the command without -g but it doesn't work either.
There is no need for this. When you install a npm package with npm install <package name> (globally or locally), it already installs all of its dependencies on its own.
You only need the npm install command when you checked out an Application with a package.json-File to install the APPLICATIONS Dependencies.
If you want to upgrade ALL global packages, you should use:
npm update -g

fails installing node package using npm on debian

I have just built a server and installed NodeJS (compiled from source). I can install global packages using npm but can't install anything locally:
$ npm install restify
npm ERR! Error: Attempt to unlock restify#~2.6.2, which hasn't been locked
npm ERR! at unlock (/usr/local/lib/node_modules/npm/lib/cache.js:1304:11)
npm ERR! at cb (/usr/local/lib/node_modules/npm/lib/cache.js:646:5)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:655:20
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:1290:7
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR! at OpenReq.Req.done (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR! at OpenReq.done (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.5.0-23-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "restify"
npm ERR! cwd /home/likewise-open/COVENTRY/aa7401/bookshop
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/likewise-open/.../npm-debug.log
npm ERR! not ok code 0
$
I am running the current versions of node and npm:
$ node -v
v0.10.26
$ npm -v
1.4.3
$
I am having the same issues with the request package as well.
I am the owner of the folder and all the files int contains.
Does anyone know what is going on?
The issue may be the permissions on the .npm directory in the home directory. I belatedly found this post:
NPM cannot install dependencies - Attempt to unlock something which hasn't been locked
Unfortunately until I get into work tomorrow I have no way to confirm this.

Node.js: npm doesn't install anymore

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)

Resources