Until today I have always worked on windows environment at work. Today I decided to install some packages like hapi on my Mac at home. I am stumped by the error message below. ( I am running node V0.10.26 and npm 1.4.3).
Any help would be appreciated.
Error: Attempt to unlock hapi, 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:866:5)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:883: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>
I had a similar issue that I posted on StackOverflow. Maybe this is the answer you're looking for:
Please install the latest stable version of npm and this problem should go away, as it was caused by a bunch of race conditions, small and large, inside npm. Closing as resolved / abandoned.