[英]Error installing ionic on windows 10
C:\Program Files>npm install -g ionic cordova
C:\Users\myname\AppData\Roaming\npm
`-ionic@2.1.4
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "cordova"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! path C:\Users\myname\AppData\Roaming\npm\node_modules\.staging\abbrev-514e00ac
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\myname\AppData\Roaming\npm\node_modules\.staging\abbrev-514e00ac' -> 'C:\Users\myname\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\ab brev'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\myname\AppData\Roaming\npm\node_modules\.staging\abbrev-514e00ac' -> 'C:\Users\myname\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "cordova"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! path C:\Program Files\npm-debug.log.3790864127
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'C:\Program Files\npm-debug.log.3790864127'
npm ERR! { Error: EPERM: operation not permitted, open 'C:\Program Files\npm-debug.log.3790864127'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\\Program Files\\npm-debug.log.3790864127' }
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:\Program Files\npm-debug.log
我一直試圖在Windows筆記本電腦上安裝ionic。 在筆記本電腦上安裝ionic之前,我先安裝了nodejs。 但是之后,每次我嘗試安裝ionic時,它都會在命令提示符下顯示此錯誤。 我也在該網站以及其他網站上尋找了類似的問題,但找不到任何能真正解決我問題的方法。 我還在窗口10] [1]上查看了npm install -g cordova和ionic 2 error ionic,但是在那里提供的解決方案也不起作用。
請按照以下步驟操作:
1-首先檢查您是否具有最新的節點版本。 2-然后搜索命令提示符並以管理員身份運行。 3-然后鍵入以上命令:
npm install -g ionic
npm install -g cordova
打開具有管理員權限的nodejs命令提示符,重定向到c:> drive,然后嘗試使用相同的命令。
npm install -g離子科爾多瓦
如果仍然出現錯誤,則可能是您的節點版本有問題, 這里是有關此問題的鏈接以及來自離子團隊的答復
我通過卸載nodejs並安裝新的nodejs v 5.11解決了這一問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.