首页 > 解决方案 > 无法为我的 react 项目安装我的 pro font awesome?

问题描述

我有一个小错误,我试图按照 FontAwesome 网站提供的指南来准确安装他们的软件包,但突然像往常一样出现错误。

所以他就是我所做的:

首先我点击了这个命令:

npm 配置集“@fortawesome:registry” https://npm.fontawesome.com/

其次,我点击了这个:

npm config set "//npm.fontawesome.com/:_authToken" myToken

一切都很好,我点击了这个:

npm install --save-dev @fortawesome/fontawesome-pro

但是一个错误,这里是:

npm ERR! path C:\Users\Dell\Desktop\Learn\symfprojs\talkstats\node_modules\.staging\@fortawesome\fontawesome-pro-40c9a865\webfonts\fa-regular-400.ttf
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\Dell\Desktop\Learn\symfprojs\talkstats\node_modules\.staging\@fortawesome\fontawesome-pro-40c9a865\webfonts\fa-regular-400.ttf'
npm ERR!  [OperationalError: EPERM: operation not permitted, unlink 'C:\Users\Dell\Desktop\Learn\symfprojs\talkstats\node_modules\.staging\@fortawesome\fontawesome-pro-40c9a865\webfonts\fa-regular-400.ttf'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, unlink 'C:\Users\Dell\Desktop\Learn\symfprojs\talkstats\node_modules\.staging\@fortawesome\fontawesome-pro-40c9a865\webfonts\fa-regular-400.ttf'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'unlink',
npm ERR!     path: 'C:\\Users\\Dell\\Desktop\\Learn\\symfprojs\\talkstats\\node_modules\\.staging\\@fortawesome\\fontawesome-pro-40c9a865\\webfonts\\fa-regular-400.ttf'
npm ERR!   },
npm ERR!   stack: "Error: EPERM: operation not permitted, unlink 'C:\\Users\\Dell\\Desktop\\Learn\\symfprojs\\talkstats\\node_modules\\.staging\\@fortawesome\\fontawesome-pro-40c9a865\\webfonts\\fa-regular-400.ttf'",
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'C:\\Users\\Dell\\Desktop\\Learn\\symfprojs\\talkstats\\node_modules\\.staging\\@fortawesome\\fontawesome-pro-40c9a865\\webfonts\\fa-regular-400.ttf',
npm ERR!   parent: 'talkstats'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Dell\AppData\Roaming\npm-cache\_logs\2019-07-30T03_35_04_582Z-debug.log

我不知道如何解决它。任何帮助将不胜感激。

标签: reactjsnpminstallationfont-awesome

解决方案


推荐阅读