bradtraversy / meanauthapp

Complete MEAN stack app with authentication
242 stars 152 forks source link

Angular - You cannot use the new command inside an Angular CLI project. #30

Open shipcommit opened 6 years ago

shipcommit commented 6 years ago

I'm trying to generate my angular front end app, by running ng new angular-src, but I'm getting this error You cannot use the new command inside an Angular CLI project.

cmd is run as administrator, and I'm using the same directory as all previous parts of the project.

tomcatbuzz commented 6 years ago

You can't run ng new since there is already an Angular-cli Json in the project. The project is built already. I am sure if you want to use the MeanAuth you can clone it or download it, unzip it. In the root folder run npm install (installs backend node) and in the Angular/src folder you run ng build (installs front end node), that compiles everything. Then you need to go to the db.js file in config and put your database info, if you use mlab.com you should enter your username, password, and db conn. info there.

shipcommit commented 6 years ago

I'm trying to follow the tutorial, so that I can figure out how everything works, and not rely too much on copying code. There is no angular folder in my root project folder, are you thinking about the @angular folder in node_modules, or what would I have to do to make ng new angular-src work when following the tutorial?

tomcatbuzz commented 6 years ago

Well you can follow the tutorial at youtube, but just compare your code to the repository, because since that video the Angular has been upgraded to the new version and there are a few things that have changed. All fixes have been put in my fork repo and in Brad's repo, I sent a pull request and he committed the changes. Just follow the tutorial and he will tell you when to install Angular.  On Wednesday, January 17, 2018, 2:05:10 PM EST, snowcastlegit notifications@github.com wrote:

I'm trying to follow the tutorial, so that I can figure out how everything works, and not rely too much on copying code. There is no angular folder in my root project folder, are you thinking about the @angular folder in node_modules, or what would I have to do to make ng new angular-src work when following the tutorial?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.