Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create a new project #10745

Closed
Rudis1261 opened this issue May 9, 2018 · 4 comments
Closed

Unable to create a new project #10745

Rudis1261 opened this issue May 9, 2018 · 4 comments

Comments

@Rudis1261
Copy link

Versions

Angular CLI: 6.0.0
Node: 9.3.0
OS: linux x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.0
@angular-devkit/core         0.6.0
@angular-devkit/schematics   0.6.0
@schematics/angular          0.6.0
@schematics/update           0.6.0
rxjs                         6.1.0
typescript                   2.7.2

Repro steps

Just followed the basic steps on Angular.io

npm install -g @angular/cli
ng new my-app

Observed behavior

Fails with the following error:

Schematic "ng-new" not found in collection "@schematics/angular".
Error: Schematic "ng-new" not found in collection "@schematics/angular".
    at SchematicEngine.createSchematic (/home/rudis1261/.nvm/versions/node/v9.3.0/lib/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/src/engine/engine.js:155:23)
    at CollectionImpl.createSchematic (/home/rudis1261/.nvm/versions/node/v9.3.0/lib/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/src/engine/collection.js:12:29)
    at NodeWorkflow.execute (/home/rudis1261/.nvm/versions/node/v9.3.0/lib/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/tools/workflow/node-workflow.js:70:38)
    at Promise (/home/rudis1261/.nvm/versions/node/v9.3.0/lib/node_modules/@angular/cli/models/schematic-command.js:141:22)
    at new Promise (<anonymous>)
    at NewCommand.runSchematic (/home/rudis1261/.nvm/versions/node/v9.3.0/lib/node_modules/@angular/cli/models/schematic-command.js:140:16)
    at NewCommand.<anonymous> (/home/rudis1261/.nvm/versions/node/v9.3.0/lib/node_modules/@angular/cli/commands/new.js:77:25)
    at Generator.next (<anonymous>)
    at /home/rudis1261/.nvm/versions/node/v9.3.0/lib/node_modules/@angular/cli/commands/new.js:7:71
    at new Promise (<anonymous>)

Desired behavior

This should just bootstrap a fresh project, but doesn't

Mention any other details that might be useful (optional)

I googled a bit and some suggested that I install @angular/cli with yarn. I tried that as well, but still have the same error. I tried uninstalling / reinstalling. Nothing

@Dragongurlsa
Copy link

Dragongurlsa commented May 9, 2018

I was having the same issue till I tried this command:

ng new test-app --routing

However, I am still unable to create components in the newly made app

Edit: I tried it again and now its working!

I discovered that it's how you navigate to your project in the console/terminal that. Browse to your project folder and type cd .. and drag the folder name into the terminal so it pastes the full path. When you run the commands again, they WORK!!!

@clydin
Copy link
Member

clydin commented May 9, 2018

Duplicate of #10691

Please see the above issue for possible solutions.

@clydin clydin closed this as completed May 9, 2018
@Rudis1261
Copy link
Author

Rudis1261 commented May 10, 2018

Super strange, this morning it is working. The only thing that happened in between now and then is that I reset my node to stable using nvm:

# Installed the latest
nvm install stable

# default to the latest default node
nvm alias default node

# installed the latest npm
npm install -g npm@latest

# uninstalled ang-cli
npm uninstall @nagular/cli

# installed the latest
npm install -g @angular/cli@latest

My versions now look like this:

Angular CLI: 6.0.0
Node: 10.1.0
OS: linux x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.0
@angular-devkit/core         0.6.0
@angular-devkit/schematics   0.6.0
@schematics/angular          0.6.0
@schematics/update           0.6.0
rxjs                         6.1.0
typescript                   2.7.2

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants