簡體   English   中英

無法安裝插件NPM

[英]Can't install plugin NPM

我有科爾多瓦離子應用程序。 我正在嘗試安裝插件。 我不行 我嘗試安裝的所有插件上都發生了錯誤。 例如,當我也嘗試刪除平台或在Android上運行應用程序時,就會發生這種情況。 它一直在發生。 我不知道如何解決它。 我曾嘗試清理緩存,移動緩存位置,以管理員身份運行所有內容,為文件夾及其所有子項授予完全權限。 我使用Windows 10作為管理員。

PS C:\Users\mario\Desktop\scmobileapppublic> cordova plugin add cordova-plugin-file-transfer
Error: Failed to fetch plugin cordova-plugin-file-transfer via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963248 Error output:
npm ERR! path C:\Users\mario\Desktop\scmobileapppublic\node_modules\fsevents\node_modules\aws4\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\mario\Desktop\scmobileapppublic\node_modules\fsevents\node_modules\aws4\package.json'
npm ERR!     at Error (native)
npm ERR!  { Error: EPERM: operation not permitted, unlink 'C:\Users\mario\Desktop\scmobileapppublic\node_modules\fsevents\node_modules\aws4\package.json'
npm ERR!     at Error (native)
npm ERR!   stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\mario\\Desktop\\scmobileapppublic\\node_modules\\fsevents\\node_modules\\aws4\\package.json\'\n    at Error (native)',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'C:\\Users\\mario\\Desktop\\scmobileapppublic\\node_modules\\fsevents\\node_modules\\aws4\\package.json' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mario\AppData\Roaming\npm-cache\_logs\2017-08-31T21_18_02_104Z-debug.log

任何幫助,將不勝感激! 謝謝

不知道為什么,但是這些步驟對我有用:

->刪除AppData /漫游/ npm內的node_modules文件夾

->以管理員身份打開終端並執行以下cmd:

npm cache clean --force

請注意,在我們的案例中,這將刪除全局安裝的所有軟件包,即Ionic和Cordova。 因此,您需要重新安裝它們。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM