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.

[7 beta] ng new error: "new command requires to be run outside of a project, but a project definition was found", doesn't say where the stray file is

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

Angular CLI: 7.0.0-beta.2 Node: 10.10.0 OS: linux x64

(ng new doesn’t have other versions yet)

Repro steps

ng new newProjecct

The log given by the failure

image

Desired functionality

A new project 😉

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
amitportcommented, Sep 7, 2018

Still got this error when trying from c:\ with no .angular.json or .angular.json there.

There was an .angular.json in c:\users\<my-win-username>. removing it solved the issue. Where it came from? and why it affected ng new in all locations?

2reactions
alan-agius4commented, Sep 7, 2018

Following a convo with @SanderElias, It might be that there is a hidden .angular.json.

Kindly try to check if that’s the case by executing ls -a in a terminal in the same directory that you are trying to using the ng new command.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The new command requires to be run outside of a project, but ...
error : The new command requires to be run outside of a project, but a project definition was found at he new command...
Read more >
The serve command requires to be run in an Angular project ...
... to be run in an Angular project, but a project definition could not be found.https://codedocu.com/Software/Angular/Angular- Error /E...
Read more >
How to resolve the angular error 'The serve command ... - Quora
How do I resolve the angular error "The serve command requires to be run in an Angular project, but a project definition could...
Read more >
The serve command requires to be run in an ... - C# Corner
The exact error is: The serve command requires to be run in an Angular project, but a project definition could not be found....
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:96449 - "New: fusd A library and kernel module to create userpsace char devices" status:RESOLVED resolution:OBSOLETE severity:enhancement ...
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