"ng-new"在集合"@ schematics/angular"中未找到 [英] "ng-new" not found in collection "@schematics/angular"

查看:217
本文介绍了"ng-new"在集合"@ schematics/angular"中未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已删除npm和node.此外,我已经删除并恢复了自制软件.我从在线下载站点下载了npm和node来还原它们.我还通过npm下载了角度cli.我通过终端找到了桌面,然后输入

I have deleted npm and node. In addition, I have deleted and restored homebrew. I downloaded npm and node from the online download site to restore them. I also downloaded the angular cli through npm. I located my desktop through the terminal and typed

ng new mag-board

开始我的角度项目.系统提示我出现以下错误:

to begin my angular project. I was prompted with the following error:

Schematic "ng-new" not found in collection "@schematics/angular".
Error: Schematic "ng-new" not found in collection "@schematics/angular".
    at SchematicEngine.createSchematic (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/src/engine/engine.js:232:23)
    at CollectionImpl.createSchematic (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/src/engine/engine.js:69:29)
    at NewCommand.getSchematic (/usr/local/lib/node_modules/@angular/cli/models/schematic-command.js:130:27)
    at NewCommand.initialize (/usr/local/lib/node_modules/@angular/cli/models/schematic-command.js:43:36)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

我删除了npm, 删除节点,我 删除了Angular CLI

I Deleted npm, Deleted node, and I Deleted Angular CLI

我重新安装了npm,node和Angular CLI

I reinstalled npm, node, and Angular CLI

我应该能够通过输入ng new mag-board来生成Angular项目

I should be able to generate an Angular project from typing ng new mag-board

推荐答案

您可以在我将为您做空:

第一个选项:

sudo npm uninstall @schematics/angular 

sudo npm i @schematics/angular

如果没有出现问题,则:

删除主目录中的node_modules文件夹.

Remove the node_modules folder in your home directory.

这篇关于"ng-new"在集合"@ schematics/angular"中未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆