首页 > 解决方案 > 使用 npm 安装 angular cli 时找不到模块“json-schema”

问题描述

我收到此错误: 在此处输入图像描述

我无法使用 npm 安装 angular cli。我收到“找不到模块 'json-schema'”错误。我尝试使用最新版本重新安装节点 js 和 npm。但是错误没有解决。请帮我解决一下这个。

标签: node.jsangularnpm

解决方案


我多次卸载并安装了 node/npm/angular-cli。最后在我的 windows pc 上做了一个“where ng”,发现可执行文件在 %appdata%\npm 目录下。因此,在卸载节点、删除 %appdata%\npm 目录、重新安装节点和“npm install -g angular-cli”之后,ng new 和 ng serve 命令开始工作。


推荐阅读