Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
447 views
in Technique[技术] by (71.8m points)

node.js - Fail to install npm package "npm ERR! errno -4048"

I'm trying to install npm package (node-xmpp-server) but it fail to install. previously when I'm trying to install a package that is install globally instead of locally, but now it's not installing at all.
Plz Help me.

npm install node-xmpp-server
error is: npm ERR! errno -4048
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "c:Program Files odejs ode.exe" "c:Program
Files odejs ode_modules pmin pm-cli.js" "install" "node-xmpp-server"

npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! path c:UsersJaseem AbbasDocuments ode_modules ode- xmpp-serverexamples
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! Error: EPERM, unlink 'c:UsersJaseem AbbasDocuments ode_modules ode-xmpp-serverexamples'

npm ERR! at Error (native)
npm ERR! { [Error: EPERM, unlink 'c:UsersJaseem AbbasDocuments ode_modules ode-xmpp-serverexamples']

npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! path: 'c:UsersJaseem AbbasDocuments ode_modules ode-xmpp-serverexamples' } npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EPERM, unlink 'c:UsersJaseem AbbasDocuments ode_modules ode-xmpp-serverexamples'

npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EPERM, unlink 'c:UsersJaseem
AbbasDocuments ode_modules ode-xmpp-serverexamples']
npm ERR! error rolling back errno: -4048,
npm ERR! error rolling back code: 'EPERM',
npm ERR! error rolling back path: 'c:UsersJaseem AbbasDocuments ode_modules ode-xmpp-serverexamples' }

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Kill whatever process is locking your files

It seems like this kind of error can be caused by a file permissions lock - I experienced something very similar (the same ERRNO: -4048) when installing whatwg-fetch.

I found that a Visual Studio instance I had open at the same time was acquiring all kinds of files which it didn't need. Once I closed that down, the install worked perfectly.

This may be a quickly-checked possible cause to eliminate before moving on to more drastic measures...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...