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.

ng7 can not generate new project

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Repro steps

The log given by the failure

PS D:\test> ng test The test command requires to be run in an Angular project, but a project definition could not be found. PS D:\test> ng new ng7 The new command requires to be run outside of a project, but a project definition was found at “D:\test”. PS D:\test> ng v

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 7.0.0-beta.2 Node: 8.11.4 OS: win32 x64 Angular: …

Package Version

@angular-devkit/architect 0.9.0-beta.2 @angular-devkit/core 0.9.0-beta.2 @angular-devkit/schematics 0.9.0-beta.2 @schematics/angular 0.9.0-beta.2 @schematics/update 0.9.0-beta.2 rxjs 6.2.2 typescript 3.0.3

PS D:\test>

Desired functionality

why I run ng test it hint requires to be run in and ng new it hint requires to be run outside

Mention any other details that might be useful

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23

github_iconTop GitHub Comments

131reactions
joe20123commented, Oct 27, 2018

I came across the same error. The reason is that new angular cli update makes angular-cli.json redundant, and it is replaced with angular.json instead. My previous Angular Cli version is 1.7.4, so to make the change, I ran the following command, it will make the conversion for you:

ng update @angular/cli --migrate-only --from=1.7.4

24reactions
mo-norantcommented, Oct 24, 2018

Same issue here

The serve command requires to be run in an Angular project, but a project definition could not be found. error when ng serve is issued

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to create new application/project with Angular (ng ...
If you get an error installing the CLI, this is an issue with your local npm setup on your machine, not a problem...
Read more >
Keeping Up to Date - Kendo UI for Angular - Telerik
Keeping Up to Date. The Kendo UI for Angular packages are released frequently with bug fixes and new features. Semantic Versioning. The Kendo...
Read more >
ng new - Angular
Option Description Value Type Default Value ‑‑commit Initial git repository commit information. boolean true ‑‑directory The directory name to create the workspace in. string ‑‑force Force...
Read more >
npm install angular cli
Step 1 — Installing Angular CLI 10. npm install -g @angular/cli Command will be run only one time in your system, It is...
Read more >
Zillow nottingham nh
This property is not currently available for sale. how many ... New homes for sale and plans available in Nottingham, New Hampshire.
Read more >

github_iconTop Related Medium Post

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