无法在 angular-cli 项目中使用新命令 [英] Cannot use new command inside angular-cli project

查看:33
本文介绍了无法在 angular-cli 项目中使用新命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很可能在我的 mac osx 主文件夹中意外创建了一个 angular 项目.因此,每次我尝试使用 angular-cli 创建新项目时,都会收到您不能在 angular-cli 项目中使用新命令".我已经删除了所有与脚手架项目相关的文件,但错误仍然存​​在.是否有任何底层文件需要删除才能解决此错误?

It's quite possible that an angular project was accidentally created inside my home folder in mac osx. So every time I try and create a new project using the angular-cli I receive "You cannot use the new command inside an angular-cli project". I've deleted all associated files with scaffolded project but the error persists. Are there any underlying files that need to be deleted to resolve this error?

推荐答案

父目录中的某处是 Angular-Cli 项目或运行 ng init 的地方.你已经找到你的文件结构并找到 node_modules 文件夹并将它与任何相关的 angular-cli 生成的文件(tslint.json、src 文件夹、protractor.conf.js、node_modules 文件夹、README.md、angular-cli 一起删除.json、e2e 文件夹、karma.conf.js、package.json、.npm/文件夹).

Somewhere in a parent directory is a Angular-Cli project or where an ng init was ran. You have do go up your file structure and find the node_modules folder and delete it along with any associated angular-cli generated files (tslint.json, src folder, protractor.conf.js, node_modules folder , README.md, angular-cli.json, e2e folder, karma.conf.js, package.json, .npm/ folder).

这篇关于无法在 angular-cli 项目中使用新命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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