You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
You have to be inside an angular-cli project in order to use the build command. #1400
#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.
.....
ng new hello -> ok
ng g component user -> ok
ng g component .... -> ok
ng serve -> ok
ng build -> ok
git add *
git commit -m 'msg'
ng github-pages:deploy --message "Optional commit message" -> error => github token no permission
@here looks like delete my src/ dir and many other files , my src source code lost
ng build -> error:
You have to be inside an angular-cli project in order to use the build command.
........
ng github-pages:deploy --message "msg"
(node:5689) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Built project successfully. Stored in "dist/".
fs.js:95
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
^
Error: ENOTEMPTY: directory not empty, rmdir 'next/dist/vendor/@angular/platform-browser/src/'
ng github-pages:deploy --message "msg"
ng build
You have to be inside an angular-cli project in order to use the build command.
I realize this item is about a bug, but I'd like to suggest as alternative to "The cli needs to know how the project is configured": I think it would be quite possible and useful for a subset of the CLI functionality to work on "non-CLI" project. I was recently working on such a project, and wanted to scaffold a few components. CLI could have done 90% of it for me, if CLI was willing to run on non-CLI projects. It would need to skip a few bits here and there and assume some defaults, but still more useful than refusing to run. Obviously not a priority for today... but maybe eventually?
@kylecordes I'd prefer to not mix up the two things in this issue tbh, since the crux of the issue here is a bad error catcher that leaves the repo in the wrong branch and not the project restrictions. Happy to have another issue open for discussion though.
@intellix I was thinking about that really... it would make the process a LOT simpler. Have you checked if it also works with user/organization pages? If so, I'm definitely partial to changing it that way.
The whole thing could be rewritten with a ng build --output-path=docs --base-url=projectName this way.
I am also getting the same issue. As @iBWhite said that it should be @angular/cli in package.json so I have the same entry though I am getting the same error.
I had "angular-cli": "1.0.0-beta.24" in my package.json and I updated it with a package.json overwrite, that changed it to "@angular/cli": "1.0.0-beta.30", which gave me this error. I changed it back to "angular-cli": "1.0.0-beta.24" and it is working again. I ended up here because of the unclear message as well.
On Thu 9 Feb, 2017, 8:51 AM Ryan Dammrose, ***@***.***> wrote:
I had "angular-cli": "1.0.0-beta.24" in my package.json and I updated it
with a package.json overwrite, that changed it to ***@***.***/cli":
"1.0.0-beta.30", which gave me this error. I changed it back to "angular-cli":
"1.0.0-beta.30" and it is working again.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1400 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJuOhnwFQJKiPSfF6oN2jbxN3ys2EJVCks5raoY-gaJpZM4JRPQ4>
.
@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.
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.
Activity
aciccarello commentedon Jul 21, 2016
Could you explain why this is unexpected? The cli needs to know how the project is configured.
WG-Com commentedon Jul 21, 2016
which config file ?
steps:
WG-Com commentedon Jul 21, 2016
happend again:
WG-Com commentedon Jul 21, 2016
now files in projects:(no src dir and config files now )
filipesilva commentedon Jul 21, 2016
Hi @WG-Com, it seems like something went wrong in the deploy procedure, namely the error that you got:
error => github token no permission.Sometimes when this happens the repo is left on the
gh-pagesbranch and you need to manuallygit checkout master. Your code is still there and safe.I thought That I had picked fixed all scenarios where that happens but it seems there is at least one still. I'll try to fix it.
kylecordes commentedon Jul 21, 2016
I realize this item is about a bug, but I'd like to suggest as alternative to "The cli needs to know how the project is configured": I think it would be quite possible and useful for a subset of the CLI functionality to work on "non-CLI" project. I was recently working on such a project, and wanted to scaffold a few components. CLI could have done 90% of it for me, if CLI was willing to run on non-CLI projects. It would need to skip a few bits here and there and assume some defaults, but still more useful than refusing to run. Obviously not a priority for today... but maybe eventually?
filipesilva commentedon Jul 21, 2016
@kylecordes I'd prefer to not mix up the two things in this issue tbh, since the crux of the issue here is a bad error catcher that leaves the repo in the wrong branch and not the project restrictions. Happy to have another issue open for discussion though.
kylecordes commentedon Jul 27, 2016
@filipesilva I made #1464 a feature request for the idea above.
intellix commentedon Aug 30, 2016
Just a thought, how about serving directly from
distby using this: https://github.com/blog/2228-simpler-github-pages-publishing ?filipesilva commentedon Sep 20, 2016
@intellix I was thinking about that really... it would make the process a LOT simpler. Have you checked if it also works with user/organization pages? If so, I'm definitely partial to changing it that way.
The whole thing could be rewritten with a
ng build --output-path=docs --base-url=projectNamethis way.intellix commentedon Dec 13, 2016
afraid I've never used it before, but they just posted a new blog post about it becoming even easier if it's relevant :) https://github.com/blog/2289-publishing-with-github-pages-now-as-easy-as-1-2-3
6 remaining items
abhinaypandey commentedon Feb 8, 2017
I am also getting the same issue. As @iBWhite said that it should be @angular/cli in package.json so I have the same entry though I am getting the same error.
maplion commentedon Feb 9, 2017
I had
"angular-cli": "1.0.0-beta.24"in my package.json and I updated it with a package.json overwrite, that changed it to"@angular/cli": "1.0.0-beta.30", which gave me this error. I changed it back to"angular-cli": "1.0.0-beta.24"and it is working again. I ended up here because of the unclear message as well.abhinaypandey commentedon Feb 9, 2017
abhinaypandey commentedon Feb 9, 2017
@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.
maplion commentedon Feb 9, 2017
@abhinaypandey I ran an
npm install -g @angular/cliand annpm install @angular/cliand 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 installin order to clean up some other errors I was getting after the change.plastikaweb commentedon Feb 9, 2017
I just run into this problem,
Fixed updating angular-cli in this way:
npm uninstall -g angular-cli @angular/clinpm cache cleannpm install -g @angular/cli@latestNo need to delete the node_modules folder
dinhkk commentedon Feb 10, 2017
I have tried @plastikaweb 's instructions, but not successed
plastikaweb commentedon Feb 10, 2017
mmm @dinhkk have you tried to run
ng initafter that?JGdijk commentedon Feb 16, 2017
@plastikaweb solution worked for me after changing my package.json, angular-cli.json and running ng init after that.
nbora98 commentedon Mar 6, 2017
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.
seize11 commentedon Mar 22, 2017
@nbora98 hey ,Your last sentence blind my dog's eyes
WG-Com commentedon Mar 22, 2017
@seize11 你亮瞎了我的狗眼
angular-automatic-lock-bot commentedon Sep 8, 2019
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.