question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't use 'ng g *' or 'ng generate *'

See original GitHub issue

os :ubuntu 14. angular version: $ ng version _ _ ____ _ ___ / \ _ __ __ _ _ | | __ _ _ __ / | | | | / △ \ | ’ \ / _ | | | | |/ _ | '| | | | | | | / ___ | | | | (| | || | | (| | | | || | | | // __| ||_, |_,||_,|| _||| |___/ @angular/cli: 1.4.6 node: 8.5.0 os: linux x64 @angular/animations: 4.4.4 @angular/common: 4.4.4 @angular/compiler: 4.4.4 @angular/core: 4.4.4 @angular/forms: 4.4.4 @angular/http: 4.4.4 @angular/platform-browser: 4.4.4 @angular/platform-browser-dynamic: 4.4.4 @angular/router: 4.4.4 @angular/cli: 1.4.6 @angular/compiler-cli: 4.4.4 @angular/language-service: 4.4.4 typescript: 2.3.4

use ng new aaa to new an angular project then run ng g component dfffd under directory

here are the error imformations: Error: ELOOP: too many symbolic links encountered, stat ‘/home/upsmart/task/2017.10/aaa/node_modules/@angular/cli/node_modules/webpack/node_modules/escope/node_modules/es6-map/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d/node_modules/es5-ext/node_modules/es6-iterator/node_modules/d’

I had tried these messures: 1:reinstall the cli (this didn’t work for me )

npm uninstall -g  @angular/cli 
npm cache verify
ng  -v 
npm install -g @angular/cli@latest

2:remove the node_modules directory under aaa , then run ‘npm install ’ It made the ’ ng g *’ work.

SO I WONDER IS THIS A PROBLEM ABOUT VERSION ?HOW TO FIX IT ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zhangshichuancommented, Oct 12, 2017

你好, 问题解决了吗? 我也是这个问题,

0reactions
angular-automatic-lock-bot[bot]commented, Sep 7, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

command not found while creating new project using angular ...
Installed angular-cli globally using ( npm install -g angular-cli ) but when I'm trying to create project using ng new my-project it is...
Read more >
ng generate - Angular
Generates and/or modifies files based on a schematic. ng generate < schematic >. ng g < schematic >. This command has the following...
Read more >
ng generate error · Issue #10653 · angular/angular-cli - GitHub
ng g component home --skip-import (same as generate everything) ... Can't use ng CLI to genereate a component in a library project #10674....
Read more >
Ways to fix “-bash: ng: command not found” - Medium
1 . Linking angular/cli with npm. This can be done using the command, npm link @angular/cli · 2. Setting the location of npm...
Read more >
ng generate component using the CLI - Pluralsight
ng generate component is a simple one-line command which creates different files and a folder, and it references the newly created component ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found