Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

C:Userswangwc>npm i -g cnpm
C:UserswangwcAppDataRoamingnpm
`-- (empty)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:Program Files odejs ode.exe" "C:Program Files odejs
node_modules pmin pm-cli.js" "i" "-g" "cnpm"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! path C:UserswangwcAppDataRoamingnpmnode_modulescnpmnode_modules
mkdirp
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:UserswangwcAppData
Roamingnpmnode_modulescnpmnode_modulesmkdirp' -> 'C:UserswangwcAppDataR
oamingnpmnode_modulescnpmnode_modules.mkdirp.DELETE'
npm ERR! at moveAway (C:Program Filesnodejsnode_modulesnpmlibinstalla
ctionfinalize.js:38:5)
npm ERR! at destStatted (C:Program Filesnodejsnode_modulesnpmlibinstal
lactionfinalize.js:27:7)
npm ERR! at C:Program Filesnodejsnode_modulesnpmnode_modulesgraceful-f
spolyfills.js:267:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:UserswangwcAppData
Roamingnpmnode_modulescnpmnode_modulesmkdirp' -> 'C:UserswangwcAppDataR
oamingnpmnode_modulescnpmnode_modules.mkdirp.DELETE'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, rename 'C:UserswangwcAppDa
taRoamingnpmnode_modulescnpmnode_modulesmkdirp' -> 'C:UserswangwcAppDat
aRoamingnpmnode_modulescnpmnode_modules.mkdirp.DELETE'
npm ERR! at moveAway (C:Program Filesnodejsnode_modulesnpmlibinstalla
ctionfinalize.js:38:5)
npm ERR! at destStatted (C:Program Filesnodejsnode_modulesnpmlibinstal
lactionfinalize.js:27:7)
npm ERR! at C:Program Filesnodejsnode_modulesnpmnode_modulesgraceful-f
spolyfills.js:267:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:UserswangwcAppData
Roamingnpmnode_modulescnpmnode_modulesmkdirp' -> 'C:UserswangwcAppDataR
oamingnpmnode_modulescnpmnode_modules.mkdirp.DELETE'
npm ERR! at Error (native) parent: 'cnpm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! C:Userswangwcnpm-debug.log
npm ERR! code 1


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

1 Answer

我这边把类似目录 C:UsersAdministratorAppDataRoaming pm-cache 清空,删除node_modules,然后重新install,或者添加新的包都可以了,具体原因是不是npm新旧版本对包的新旧版本处理方式不同,以往都没有这个问题


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...