Getting error while creating new angular4 App

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Getting error while creating new angular4 App



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.


9.4


angular-cli version 1.7.1


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.





This is strange, or you on Linux or OS X? Did you install the CLI globally or locally?
– Alex Tea
Mar 22 at 10:22





I am using Ubuntu and cli installed globally.
– subhra
Mar 22 at 10:22





Do you have execute permission for those files? if not try chmod +x * in the app's root folder
– cyberpirate92
Mar 22 at 12:27


chmod +x *




2 Answers
2



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



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





I can create it from other directory location but particular from some directory it could not create.
– subhra
Mar 23 at 8:37







By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS