ng build -prod fails with Error: ENOTEMPTY: directory not empty
Please provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Mac OSX El Capitan
- Versions. Please run
ng --version. If there's nothing outputted, please run in a Terminal:node --versionand paste the result here:
angular-cli: 1.0.0-beta.10 node: 4.4.2 os: darwin x64
- Repro steps. Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
- Create project with angular cli (ng new)
- ng serve and ng build work
- ng build -prod fails
- The log given by the failure. Normally this include a stack trace and some more information.
Carloss-MBP:connect-four cmermingas$ ng github-pages:deploy --user-page Built project successfully. Stored in "dist/". fs.js:60 throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs ^
Error: ENOTEMPTY: directory not empty, rmdir '/Users/cmermingas/web_projects/connect-four/dist/vendor/@angular/platform-browser/' at Error (native)
- Mention any other details that might be useful.
I read through Issue #917. I manually removed the directory mentioned in the error. Then it gave me an error with the '@angular' directory. I removed it and then it worked. Since #917 is closed, I decided to open this issue. Not sure if it's a legit bug or I am doing something wrong.
Thanks! We'll be in touch soon.
I'm not too sure of the reason for that problem, since you tried the solutions in the other issue. Off the top of my head, it could be editor related - VSCode often keeps locks on folders, and the only solution is to close the editor.
We're currently moving to a webpack based build system though, and that problem should be completely gone. See https://github.com/angular/angular-cli#webpack-preview-release-update if you're interested in trying it out.
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.