Reputation: 73
While trying to create new angular application using Angular CLI 8, it shows the error the same for ng update
I have many time reinstalled angular cli & node. Also updated the local cli
ng new ng8
Workspace needs to be loaded before it is used.
Error: Workspace needs to be loaded before it is used.
at Workspace._assertLoaded (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/experimental/workspace/workspace.js:108:19)
at Workspace._getTool (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/experimental/workspace/workspace.js:214:14)
at Workspace.getCli (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/experimental/workspace/workspace.js:196:21)
at NewCommand.getDefaultSchematicCollection (/usr/local/lib/node_modules/@angular/cli/models/schematic-command.js:266:36)
at NewCommand.parseCollectionName (/usr/local/lib/node_modules/@angular/cli/commands/new-impl.js:41:43)
at NewCommand.initialize (/usr/local/lib/node_modules/@angular/cli/commands/new-impl.js:22:40)
at NewCommand.validateAndRun (/usr/local/lib/node_modules/@angular/cli/models/command.js:127:20)
at async Object.runCommand (/usr/local/lib/node_modules/@angular/cli/models/command-runner.js:178:24)
at async default_1 (/usr/local/lib/node_modules/@angular/cli/lib/cli/index.js:32:31)
Upvotes: 0
Views: 419
Reputation: 2398
I have came across same issue when I accidentally rewritten ~/.angular-config.json
with empty content.
Deleting this file fixed the issue.
Upvotes: 0
Reputation: 450
Try removing your .angular-config.json, it worked for me.
rm ~/.angular-config.json
Upvotes: 1