Reputation:
I am getting the following error while creating the angular4 new App.
Error:
Error: Path "/app/app.module.ts" does not exist.
Path "/app/app.module.ts" does not exist.
I have node version 9.4
and angular-cli version 1.7.1
and when I type like below.
subrajyoti@subrajyoti-H81M-S:/var/www/html/angular4-learning$ ng new myapp
I have also the write permission o this folder but still getting the above error. Here I need to resolve this error so that I can create new App.
Upvotes: 0
Views: 317
Reputation: 803
I was also getting the same error, First I thought the issue is in npm but when I ran "npm audit" it shown me 0 vulnerabilities. Then I came to know that issue might be in angluar cli.
So I have removed the angular cli, cleared the npm cache and install fresh angular cli.
It works!
Steps that I followed:
npm uninstall -g @angular/cli
npm install --cache /tmp/empty-cache
npm install -g @angular/cli
ng new NewProject
Upvotes: 1
Reputation: 165
I just attempted to recreate this issue without any luck. Steps:
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli
ng new foo
This worked successfully for me.
macOs node: 8.9.0 npm: 5.6.0 @angular/cli: 1.6.3
Upvotes: 0