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

Created on 24 Dec 2017  Â·  34Comments  Â·  Source: angular/angular-cli

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.

1 (urgent) regression bufix

Most helpful comment

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

All 34 comments

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

I having this trouble too.

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

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

Downgrading didnt really work

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.

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

@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.

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

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

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

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)

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

Same issue. Any workaround?

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

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 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.

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 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.

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 are you using homebrew to install node?

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

Ok trying now... And how did you reinstall Angular CLI? @OrkhanHuseynli

@lenichols
if you delete all node files, then actually you delete your angular installation by default.
Therefore, you don't "reinstall" angular again,
Thus, follow steps I provided in above comment:
Install Node: simply run installation file
Install angular: npm install -g @angular/cli

@OrkhanHuseynli - this worked!

  1. I uninstalled node completely including its dependencies
  2. Reinstalled it using the node package from Node's website - not homebrew
  3. Installed AngularCLI

it worked. I did this 3 times each installing node via homebrew and it did not work. I think the issue may be in the homebrew install IDK.

same issue.
Is there no way to solve this problem but to reinstall node.js completely including all of its packages?

In my case the problem was folder permission. I tried in a folder with full permission and worked.

If you are using windows just uncheck Readonly

If you are using OS base on Linux Kernel just:

sudo chmod 644 -R foldername

I can't figure out how how resolve this issue. I still receive this
Error: Path "/app/app.module.ts" does not exist.
Path "/app/app.module.ts" does not exist.

I also have the same error. I am using node 9.8.0, have tried Angular CLI 1.7,3, 1.7.2, 1.5.3, 1.6.0 and others, Ubuntu 16.04.4 and NVM 0.33.8

Same issue Error: Path "/app/app.module.ts" does not exist.
Path "/app/app.module.ts" does not exist. Lets keep this going until a solution,

Did anyone find a solution ?

I used windows 10. It also work in my Mac with a workaround.

On Wed, 21 Mar 2018, 00:46 Andy, notifications@github.com wrote:

Did anyone find a solution ?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular-cli/issues/8989#issuecomment-374805280,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABwTc82AstOg9_h8V6Ic4gNRnDB2yG5rks5tgaL_gaJpZM4RL9mS
.

>

Regards

Abdul Jabbar Azam
twitter: @ajazam

just uninstall angular/cli and clean cache and again install angular/cli and try ng new "your app name" it will work......./

Hi @eragon11, that doesn't work for me.
Please tell me the version that you have of node, cli, and npm
Thanks

@OrkhanHuseynli and @lenichols also worked for me.

  1. I uninstalled Node 8.x using the "Uninstall Nodejs" program included with the Node installation on Windows 10
  2. I installed @angular/cli 1.7.4 globally using NPM.
  3. I installed Node 10.x via website download (not Homebrew)

No longer receiving the "Error: Path" issue.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings