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

[ERROR] ng new failed on @angular/cli 1.6

Open choucry13 opened this issue 8 years ago • 38 comments

Versions

Angular CLI: 1.6.0
Node: 8.9.1
OS: darwin x64

Repro steps

when i launch command ng new to create a new app, i have error.

Observed behavior

ng new look-error
error! look-error/src/app/app.component.html already exists. error! look-error/src/app/app.component.spec.ts already exists. error! look-error/src/app/app.component.ts already exists. error! look-error/src/app/app.module.ts already exists. ENOENT: no such file or directory, uv_chdir Error: ENOENT: no such file or directory, uv_chdir at process.chdir (/usr/local/lib/node_modules/@angular/cli/node_modules/graceful-fs/polyfills.js:21:9) at /usr/local/lib/node_modules/@angular/cli/tasks/init.js:74:25 at at process._tickCallback (internal/process/next_tick.js:188:7)

Desired behavior

Mention any other details that might be useful (optional)

choucry13 avatar Dec 06 '17 22:12 choucry13

Testing now @hansl

InfoScion avatar Dec 06 '17 23:12 InfoScion

@hansl Just tried it, everything is working.

ghost avatar Dec 06 '17 23:12 ghost

@hansl Can confirm working on mac os after reinstalling and creating new project. Thanks!

markbosky avatar Dec 06 '17 23:12 markbosky

@hansl works now, thank you so much

yashints avatar Dec 06 '17 23:12 yashints

Closing this issue as fixed. Thanks all!

hansl avatar Dec 06 '17 23:12 hansl

wow, thanks :) literally just found this a few minutes ago.

robpodosek avatar Dec 07 '17 00:12 robpodosek

Thanks for the fix Hansl!

MendelBak avatar Dec 07 '17 00:12 MendelBak

I am completely new to this, can some one please give me some advice on how to apply the fix? Thanks in advance.

cortez-scr avatar Dec 07 '17 00:12 cortez-scr

@cortez-scr npm install -g @angular/cli, ng new my-app

markbosky avatar Dec 07 '17 00:12 markbosky

Oh ok, I understand . By re-executing npm install, i am downloading the fixes and automatically replacing them on my machine. Pretty cool! Thanks

cortez-scr avatar Dec 07 '17 00:12 cortez-scr

Thanks @hansl

santiagopb avatar Dec 07 '17 18:12 santiagopb

Shouldn't there be a publicly visible 1.6.1 release for this fix? I do not see it when I click on the Releases tab.

fmorriso avatar Dec 08 '17 15:12 fmorriso

@fmorriso No, because it wasn't @angular/cli that had the issue. It was another package that @angular/cli depends on (angular/devkit package).

trevor-hackett avatar Dec 08 '17 18:12 trevor-hackett

@yarrgh Thanks for the clarification. I was unaware this issue was caused by another package, much less that it was fixed, which is why I waited (in vain it turns out) for a patch release to appear.

May I make a suggestion? Whenever these situations exist and are fixed by some kind of "not visible to the general public" technique like was the case in this issue, can somebody make a public announcement (changelog.md ?, WiKi entry, etc.) so that it stands out? Otherwise, you have to search through the issues and hopefully notice that the issue was resolved, something I'm betting that not a lot of people will see.

Just my two cents worth.

fmorriso avatar Dec 08 '17 23:12 fmorriso

Hey guys,

I'm having the same issue and I've done

npm uninstall -g @angular/cli
npm cache verify
npm i -g @angular/cli
ng new t

Yet still get the same errors, I'm on now 8.9 and angular cli 1.6.6...

seekheart avatar Jan 29 '18 21:01 seekheart

I'm also having the same problem... =/

$ sudo ng new angular-src Error: Path "/app/app.module.ts" does not exist. Path "/app/app.module.ts" does not exist.

I'm using MacOs High Sierra 10.13.2

andreobueno avatar Jan 31 '18 08:01 andreobueno

@seekheart try creating the project at some new path. this resolved the issue for me.

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.