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

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 <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)

Desired behavior

Mention any other details that might be useful (optional)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 22
  • Comments: 38 (8 by maintainers)

Most upvoted comments

This is a problem with trying to overwrite files in Schematics. It seems like some files were created twice and fixing a bug in validation actually uncovered the error. I’m working on a fix right now.

Testing locally, I’ll come back with some (hopefully good) news soon.

Closing this issue as fixed. Thanks all!

Done. Can someone checks that it works? (It works locally).

@yarrgh you are right, when I downgraded it to 1.5.5 and 1.4.x this problem still occured.

I don’t think it’s an issue with @angular/cli itself but on one of its dependencies.

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

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…

@hansl Just tried it, everything is working.

Same here on Windows 7.