angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

You have to be inside an angular-cli project in order to use the build command.

Open WG-Com opened this issue 10 years ago • 30 comments

#i run this command 
git add *
git commit -m 'msg'
ng github-pages:deploy --message "Optional commit message"

then error to me :

#ng build
You have to be inside an angular-cli project in order to use the build command.

#ng g component hello
You have to be inside an angular-cli project in order to use the g command.

.....

WG-Com avatar Jul 20 '16 21:07 WG-Com

@maplion I tried that but it's asking me to select versions below 1.0.0-beta.28.3. It says could not find specified dependency.

abhinaypandey avatar Feb 09 '17 04:02 abhinaypandey

@abhinaypandey I ran an npm install -g @angular/cli and an npm install @angular/cli and it seems to be bundling/compiling again as intended with the new format "@angular/cli": "1.0.0-beta.30".

Note: I did have to rename / delete my node_modules folder and redo an npm install in order to clean up some other errors I was getting after the change.

maplion avatar Feb 09 '17 05:02 maplion

I just run into this problem, Fixed updating angular-cli in this way:

npm uninstall -g angular-cli @angular/cli npm cache clean npm install -g @angular/cli@latest

No need to delete the node_modules folder

plastikaweb avatar Feb 09 '17 14:02 plastikaweb

I have tried @plastikaweb 's instructions, but not successed

dinhkk avatar Feb 10 '17 01:02 dinhkk

mmm @dinhkk have you tried to run ng init after that?

plastikaweb avatar Feb 10 '17 07:02 plastikaweb

@plastikaweb solution worked for me after changing my package.json, angular-cli.json and running ng init after that.

JGdijk avatar Feb 16 '17 13:02 JGdijk

Hi , Try the below solution may be it could help. Step 1. Run this command on root folder [npm install -g angular -cli] Step 2. Create new folder for your project [ng new project_folder_name] Step 3. Enter inside that folder [cd project_folder_name] Step 4. Run the project by this command [ng serve] (Note: Now on localhost:4200, the demo project will run) Step 5. Copy the '/src' folder of your existing project and replace with the '/src' of your newly created project from Project's root folder only.

Do let me know if you have any confusion.

nbora98 avatar Mar 06 '17 06:03 nbora98

@nbora98 hey ,Your last sentence blind my dog's eyes

seize11 avatar Mar 22 '17 02:03 seize11

@seize11 你亮瞎了我的狗眼

WG-Com avatar Mar 22 '17 05:03 WG-Com

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.