1
votes

I know that there is already questions like this that has answers to it, but i tried the most common solutions and i have been unsuccessful.

I'm cloning an angular 4 project from github and i do an npm install and i get this error when i run ng serve.

Local workspace file ('angular.json') could not be found. Error: Local workspace file ('angular.json') could not be found. at WorkspaceLoader._getProjectWorkspaceFilePath (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/@angular/cli/models/workspace-loader.js:37:19) at WorkspaceLoader.loadWorkspace (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/@angular/cli/models/workspace-loader.js:24:21) at BuildCommand._loadWorkspaceAndArchitect (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/@angular/cli/models/architect-command.js:180:32) at BuildCommand. (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/@angular/cli/models/architect-command.js:47:25) at Generator.next () at /Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/@angular/cli/models/architect-command.js:7:71 at new Promise () at __awaiter (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/@angular/cli/models/architect-command.js:3:12) at BuildCommand.initialize (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/@angular/cli/models/architect-command.js:46:16) at Object. (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/@angular/cli/models/command-runner.js:87:23)

My node version is

v8.11.2

My angular version is

Angular CLI: 6.0.8 Node: 8.11.2 OS: darwin x64 Angular: 4.1.3

Any suggestions on what i should do ?

1
what version of angular cli do you have installed globally?tcrite
seems like you have 6 installed going by the fact it's looking for 'angular.json' and not 'angular-cli.json'tcrite
my bad...just saw your versionstcrite

1 Answers

0
votes

Try downgrading your project version of angular-cli to a version that's compatible with ng4...or upgrade the ng4 app to ng6