简体   繁体   English

有没有办法清除 React 中的这个节点模块错误,或者我从头开始重新安装?

[英]Is there a way to clear this node-modules error in React or do I re-install from scratch?

[I was trying to install react router when my vscode terminal showed some issues so i used npm audit fix --force after which it just showed more issues. [当我的 vscode 终端显示一些问题时,我试图安装反应路由器,所以我使用了 npm 审计修复 --force 之后它只显示了更多问题。 I've deleted node-modules and reinstalled but its still the same thing.我已经删除了节点模块并重新安装,但它仍然是一样的。 Now the app page is displaying this.现在应用页面正在显示这个。 ][1] ][1]

To clear the cache present in npm, you need to run the command.要清除 npm 中存在的缓存,您需要运行该命令。 If it doesn't work, run the force clean method since the cache is not cleared simply.如果它不起作用,请运行 force clean 方法,因为缓存不会简单地清除。 See the below command.请参阅以下命令。

npm cache clean --force  

The clean command show above clears all the data present in your cache folder.上面的 clean 命令显示清除缓存文件夹中的所有数据。 To verify whether your cache is cleared or not, you need to use the below command.要验证您的缓存是否已清除,您需要使用以下命令。

npm cache verify

After that run the installation command.之后运行安装命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM