Angular 应用程序安装错误:在“...//registry.npmjs.org/"附近解析时意外结束 JSON 输入 [英] Angular app installing Error: Unexpected end of JSON input while parsing near '...//registry.npmjs.org/'
问题描述
我对 Angular 很陌生.我已经使用以下命令安装了 Angular:
I am very new to Angular. I have installed the Angular by using the command:
npm install -g @angular/cli
当我检查 Angular 的版本时,它显示:
When I check the version of Angular it shows:
之后,我使用以下命令安装了一个 Angular 应用程序:ng new newApp
After on, I installed an Angular application by using: ng new newApp
我在应用安装过程中遇到错误:
I have got an error during app installation:
解析附近时 JSON 输入意外结束'...//registry.npmjs.org/'
Unexpected end of JSON input while parsing near '...//registry.npmjs.org/'
这是我所做的图像:
您可以通过此链接查找日志内容:https://drive.google.com/file/d/11MEWOcSaU4c-1879LuijRiXRvCu-cAIz/view?usp=sharing
You can find log content through this link: https://drive.google.com/file/d/11MEWOcSaU4c-1879LuijRiXRvCu-cAIz/view?usp=sharing
让我知道问题出在哪里...
Let me know where is the problem...
推荐答案
先尝试使用以下命令清除 npm 缓存,然后尝试创建新的 ng 应用程序
Try clearing the npm cache first using the following command and then try creating a new ng application
npm cache clean --force
这篇关于Angular 应用程序安装错误:在“...//registry.npmjs.org/"附近解析时意外结束 JSON 输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!