3
votes

When i download a repository from github to run angular project i run command npm install to add node modules in this project then when i run ng serve i get this error:

enter image description here

Error: Could not find API compiler-cli, function VERSION

at_error(C:\Users\Daniyal\node_modules@ngtools\webpack\src\ngtools_api.js:8:11 atgetApiMember(C:\Users\Daniyal\node_modules@ngtools\webpack\src\ngtools_api.js:11:32) at Object. (C:\Users\Daniyal\node_modules@ngtools\webpack\src\ngtools_api.js:50:19) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32)

at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (C:\Users\Daniyal\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:28:23) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3)

You can see from here also:

Could not find API compiler-cli, function VERSION

1

1 Answers

1
votes

Make sure that you have @angular/compiler in the npm dependencies list in package.json and the package is installed.