ng serve - ENOENT: no such file or directory

2k views Asked by At

Following this tutorial: Build a Basic CRUD App with Angular 7.0 and Spring Boot 2.1

cloning this repository (angular 6+)

git clone https://github.com/oktadeveloper/okta-spring-boot-2-angular-7-example.git

cd okta-spring-boot-2-angular-7-example/client

npm install

ng serve

Got this error:

ENOENT: no such file or directory, open 'C:\C\angular\okta\okta-spring-boot-2-angular-7-example\client\node_modules\@angular\cli\commands\version.json'

My angular version:

ng --version

Your global Angular CLI version (6.2.1) is greater than your local
version (6.2.0-beta.3). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
ENOENT: no such file or directory, open 'C:\C\angular\okta\okta-spring-boot-2-angular-7-example\client\node_modules\@angular\cli\commands\version.json'
Error: ENOENT: no such file or directory, open 'C:\C\angular\okta\okta-spring-boot-2-angular-7-example\client\node_modules\@angular\cli\commands\version.json'
    at Object.fs.openSync (fs.js:663:18)
    at Object.fs.readFileSync (fs.js:568:33)
    at findCommand (C:\angular\okta\okta-spring-boot-2-angular-7-example\client\node_modules\@angular\cli\models\command-runner.js:302:31)
    at Object.<anonymous> (C:\angular\okta\okta-spring-boot-2-angular-7-example\client\node_modules\@angular\cli\models\command-runner.js:80:31)
    at Generator.next (<anonymous>)
    at C:\angular\okta\okta-spring-boot-2-angular-7-example\client\node_modules\@angular\cli\models\command-runner.js:14:71
    at new Promise (<anonymous>)
    at __awaiter (C:\angular\okta\okta-spring-boot-2-angular-7-example\client\node_modules\@angular\cli\models\command-runner.js:10:12)
    at Object.runCommand (C:\angular\okta\okta-spring-boot-2-angular-7-example\client\node_modules\@angular\cli\models\command-runner.js:51:12)
    at C:\angular\okta\okta-spring-boot-2-angular-7-example\client\node_modules\@angular\cli\lib\cli\index.js:38:58

P/s: I got the error even with ng --version typed in the folder of the project

any ideas?

0

There are 0 answers