Ng new hello Error: The path "/app/app.module.ts" does not exist. The path "/app/app.module.ts" does not exist

I have to face a problem when creating a new project in angular. When I run a new myapp command, I get the following command

ng new hello

Error: Path "/app/app.module.ts" does not exist.
Path "/app/app.module.ts" does not exist.

can someone help me?

+4
source share
4 answers

Here is the solution

Please make sure that your new folder have write permission   

if you are using ubuntu run the below command in this folder

sudo chmod 644 -R foldername 

then run ng new appname

and also check the version of node

+3
source

Fixed by simply deleting all the node_module folders on my drive:

  • Open Finder (on Mac) or Explorer (on Windows)
  • search for all occurrences of node_module folders
  • move it all to the trash bin (you can undo it, but not necessary).

. , .

, , . .

+2

This means that the folder in which you are creating the angular project is corrupted. The same team will work in a different way.

+1
source

My explanation for this “black magic” of a damaged folder, as mentioned in @prathiba palanisami, is that you may have node modules “damaged” from an old installation in your own folder.

0
source

Source: https://habr.com/ru/post/1690595/


All Articles