node.js - 使用 npm 安装 angular cli 时找不到模块“json-schema”
问题描述
我无法使用 npm 安装 angular cli。我收到“找不到模块 'json-schema'”错误。我尝试使用最新版本重新安装节点 js 和 npm。但是错误没有解决。请帮我解决一下这个。
解决方案
我多次卸载并安装了 node/npm/angular-cli。最后在我的 windows pc 上做了一个“where ng”,发现可执行文件在 %appdata%\npm 目录下。因此,在卸载节点、删除 %appdata%\npm 目录、重新安装节点和“npm install -g angular-cli”之后,ng new 和 ng serve 命令开始工作。
推荐阅读
- python - python合并两个数据框并保留两者的值
- netbeans - Netbeans 中的 Polymer3 HTML 格式
- node.js - 在MongoDB中返回数据之前有条件地添加过滤器困境
- python - xarray 的导入错误返回“导入 defs 时 DLL 加载失败”
- javascript - loading="lazy" 但对于 html5 视频
- c# - 非静态字段、方法或属性需要对象引用 (Unity C#)
- c# - Base64 字符串编码的图像未加载到输出 PDF (TuesPechkin / Wkhtmltopdf)
- angular - Angular HttpClient 服务仅返回状态码为 200 的响应
- c# - EF Core 删除对自身的引用而不删除
- confluence - 将用户宏转换为 Connect 或 Forge