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.

angular.json not found

See original GitHub issue

I’m submitting a…


[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

Current behavior

After default app creation, ‘npm start’ results in launch failure due to not finding ‘angular.json’:

> angular-universal-pwa@2.0.0-beta.3 start C:\Users\wayne\Projects\myAwesomeApp                                                                         
> run-p build:watch credentials                                                                                                                         
                                                                                                                                       
> angular-universal-pwa@2.0.0-beta.3 build:watch C:\Users\wayne\Projects\myAwesomeApp                                                                   
> ng serve                                                                                                                                              
                                                                                                                                                                                                                                                                                                            
> angular-universal-pwa@2.0.0-beta.3 credentials C:\Users\wayne\Projects\myAwesomeApp                                                                   
> node credentials.js && opencollective postinstall                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
Do you ❤️ angular-universal-pwa?                                                                                                                                                                                                                                                                              
...                                                                                                                           
                                                                                                                                                        
Local workspace file ('angular.json') could not be found.                                                                                               
Error: Local workspace file ('angular.json') could not be found.                                                                                        
    at WorkspaceLoader._getProjectWorkspaceFilePath (C:\Users\wayne\Projects\myAwesomeApp\node_modules\@angular\cli\models\workspace-loader.js:37:19)   
    at WorkspaceLoader.loadWorkspace (C:\Users\wayne\Projects\myAwesomeApp\node_modules\@angular\cli\models\workspace-loader.js:24:21)                  
    at ServeCommand._loadWorkspaceAndArchitect (C:\Users\wayne\Projects\myAwesomeApp\node_modules\@angular\cli\models\architect-command.js:177:32)      
    at ServeCommand.<anonymous> (C:\Users\wayne\Projects\myAwesomeApp\node_modules\@angular\cli\models\architect-command.js:45:25)                      
    at Generator.next (<anonymous>)                                                                                                                     
    at C:\Users\wayne\Projects\myAwesomeApp\node_modules\@angular\cli\models\architect-command.js:7:71                                                  
    at new Promise (<anonymous>)                                                                                                                        
    at __awaiter (C:\Users\wayne\Projects\myAwesomeApp\node_modules\@angular\cli\models\architect-command.js:3:12)                                      
    at ServeCommand.initialize (C:\Users\wayne\Projects\myAwesomeApp\node_modules\@angular\cli\models\architect-command.js:44:16)                       
    at Object.<anonymous> (C:\Users\wayne\Projects\myAwesomeApp\node_modules\@angular\cli\models\command-runner.js:100:23)                              
npm ERR! code ELIFECYCLE                                                                                                                                
npm ERR! errno 1                                                                                                                                        
npm ERR! angular-universal-pwa@2.0.0-beta.3 build:watch: `ng serve`                                                                                     
npm ERR! Exit status 1                                                                                                                                  
npm ERR!                                                                                                                                                
npm ERR! Failed at the angular-universal-pwa@2.0.0-beta.3 build:watch script.                                                                           
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.                                                      

Expected behavior

npm start produces running app

Minimal reproduction of the problem with instructions

npm install -g angular-universal-pwa@beta ng new --collection angular-universal-pwa myAwesomeApp cd myAwesomeApp
npm start

What is the motivation / use case for changing the behavior?

Attempting to recreate example shown in Youtube video https://www.youtube.com/watch?v=FPWRXSzhjug&feature=youtu.be

Environment


Angular version: X.Y.Z

Angular CLI: 6.0.0-rc.5
Angular: 6.0.0-rc.5

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  
Windows 10 Pro

Others:

“name”: “angular-universal-pwa”, “version”: “2.0.0-beta.3”, npm 5.8.0 node: 9.6.1 OS: win32 x64 (Windows 10 Pro)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
wstidolphcommented, Apr 24, 2018

Oh, sorry about the mistakes … closed in error. I deleted the project, re-ran, with --verbose flag to ng new (so,

ng new --verbose --collection angular-universal-pwa myAwesomeApp
and attach the command line output as a file. issue228_ng_new_output.txt

The new project has the same problem (missing angular.json)

0reactions
maciejtredercommented, May 3, 2018

Yeah. You’re right. When I deployed 2.0.6 I run into that issue and fixed it. 2.0.91 is this one which should be used. I also removed @beta version and merge it into official release version (all functionalities for newest CLI are now available also for 1.x).

One more time. Thank you for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Local workspace file ('angular.json') could not be found
json file never shows up. However, if i delete the angular-cli. json file, run the command, the angular-cli. json file is added back....
Read more >
Local workspace file ('angular.json') could not be found. #8
If you run the command 'ng new my-app' when you are already in the app folder it opens yet another folder with the...
Read more >
Error: Local workspace file ('angular.json') could ... - Filip Molcik
Error: Local workspace file ('angular.json') could not be found · Why is it? If you run into this issue, it's probably because your...
Read more >
Local workspace file ('angular.json') could not be found error ...
I am trying to use angular 4 in SharePoint Framework. Basic setup is done but when I try to use angular command ng...
Read more >
Ng Serve Not Working - Angular.json Could not be Found
Ng serve does not work because of package.json and Angular. json file configuration missing in Angular 6 version, to make it work we...
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