angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open OrkhanHuseynli opened this issue 8 years ago • 34 comments

I reinstalled Node and Angular, did it several times. cleaning cache and so on. but still get this error Can anyone please help? p.s. I've seen other discussions about the same error, but they just reinstalled their node.js and everything worked. Not in my case

issue: When I create a new project "ng new project-name" , I get this error: Error: Path "/app/app.module.ts" does not exist. Path "/app/app.module.ts" does not exist.

OrkhanHuseynli avatar Dec 24 '17 16:12 OrkhanHuseynli

Having the same issue after a fresh install of Ang CLI...

lenichols avatar Dec 24 '17 17:12 lenichols

I having this trouble too.

Make a downgrade to this version, its working: npm install --save-dev @angular/[email protected].

regnerhenrique avatar Dec 25 '17 22:12 regnerhenrique

But show this message now: You seem to not be depending on "@angular/core". This is an error. :'(

regnerhenrique avatar Dec 25 '17 23:12 regnerhenrique

Downgrading didnt really work

OrkhanHuseynli avatar Dec 27 '17 11:12 OrkhanHuseynli

After a few days, I reinstalled Angular again

now whenever I want to create a project "ng new projectname"

it gives me the following error:

Error: Invalid rule or source result: Instance of class FileSystemCreateTree. Invalid rule or source result: Instance of class FileSystemCreateTree.

OrkhanHuseynli avatar Dec 27 '17 11:12 OrkhanHuseynli

create the project in other drive, not in C drive. This works for me

tluanga avatar Dec 28 '17 10:12 tluanga

@tluanga i tried on desktop and in user root but still get this error... downgrading using npm install --save-dev @angular/[email protected] also did not work.

lenichols avatar Dec 29 '17 11:12 lenichols

any update on this issue? im also experiencing it when i updated to angular cli 1.6.3

RyanAquino avatar Dec 29 '17 14:12 RyanAquino

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

Brocco avatar Dec 29 '17 19:12 Brocco

what could be the problem? I'm still having the issue, i cant create a new project. i tried running 'npm cache clean --force' and 'npm cache verify' before installing the latest version. i also tried downgrading to @angular/cli: 1.6.2 which work previously for me, but now its returning me this issue.

macOs node: 8.9.1 npm: 5.6.0 @angular/cli: 1.6.3

RyanAquino avatar Dec 30 '17 00:12 RyanAquino

What other packages do you have installed globally (via: npm list -g -depth 0)?

Do you have a global cli config file? (~/.angular-cli.json)

Brocco avatar Dec 30 '17 02:12 Brocco

Also tried reinstalling everyting, NodeJS and Angular CLI. npm list -g -depth 0 gives me these results image still problems exists.

macOs node: 8.9.3 npm: 5.5.1 @angular/cli: 1.6.3

RyanAquino avatar Dec 30 '17 02:12 RyanAquino

Same issue. Any workaround?

Angular CLI: 1.6.3 [email protected] Node: 8.9.0 OS: win32 x64 win10

carlchandev avatar Dec 30 '17 05:12 carlchandev

i finally got it working ! .. uninstall nodejs COMPLETELY! following this link => https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x .. it should be the one voted by the question owner as an answer.

i also used a utility to find and delete those folders, its called omnidisksweeper.

RyanAquino avatar Dec 30 '17 10:12 RyanAquino

@RyanAquino which answer was it? There are several... can you list the steps you took to get this to work... you said "uninstall node" and what else??? i desperately need to get this working.

lenichols avatar Dec 30 '17 13:12 lenichols

image this answer .. find it in https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x follow this steps. basically this just removes all the folders relating to nodejs and npm. after that restart your machine, and install nodejs and angular cli with the 'sudo' command it should be working.

RyanAquino avatar Dec 30 '17 14:12 RyanAquino

@RyanAquino i just did all of these steps and stilll get the same error... :-(

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

lenichols avatar Dec 30 '17 15:12 lenichols

Solved the issue (but no idea about the root cause, I hope someone will explain) First of al, I use Windows 10.

Step 1: I deleted all node files in my user directory (C:/Users/username/...) and in other directories ( basically file that start with "node..." Step 2: deleted all angular projects saved in user directory (C:/Users/username/...) Step 3: uninstalled Node.js (I did this many time to solve this issue, but this time I restarted my machine after uninstalling)

Step 4: installed Node.js 8.9.3
Step 5: npm install -g @angular/cli Step 6: ng new foo

Everything works again

To other participants, who have similar issue, please, let me know if it works for you, And can anybody explain what could be causing the problem? thanks

OrkhanHuseynli avatar Dec 30 '17 16:12 OrkhanHuseynli

@OrkhanHuseynli are you using homebrew to install node?

lenichols avatar Dec 30 '17 19:12 lenichols

@lenichols no, simply downloading install file from https://nodejs.org/en/download/

OrkhanHuseynli avatar Dec 30 '17 20:12 OrkhanHuseynli