Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during ng build: ENOTEMPTY "...\public\ui\" #7

Open
ppanuccio opened this issue May 4, 2017 · 2 comments
Open

Error during ng build: ENOTEMPTY "...\public\ui\" #7

ppanuccio opened this issue May 4, 2017 · 2 comments

Comments

@ppanuccio
Copy link

I get the following error when I start the application (Windows 10 OS):

--- (Running the application, auto-reloading is enabled) ---

[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Ctrl+D to stop and go back to the console...)


> ui@0.0.0 build C:\dev\Play Framework\ocd\ui
> ng build --extract-css --progress --output-path ../public/ui "--watch"

ENOTEMPTY: directory not empty, rmdir 'C:\dev\Play Framework\ocd\public\ui'
Error: ENOTEMPTY: directory not empty, rmdir 'C:\dev\Play Framework\ocd\public\ui'
    at Error (native)
    at Object.fs.rmdirSync (fs.js:886:18)
    at rmkidsSync (C:\dev\Play Framework\ocd\ui\node_modules\rimraf\rimraf.js:355:25)
    at rmdirSync (C:\dev\Play Framework\ocd\ui\node_modules\rimraf\rimraf.js:333:7)
    at Function.rimrafSync [as sync] (C:\dev\Play Framework\ocd\ui\node_modules\rimraf\rimraf.js:303:9)
    at Class.run (C:\dev\Play Framework\ocd\ui\node_modules\@angular\cli\tasks\build.js:25:16)
    at Class.run (C:\dev\Play Framework\ocd\ui\node_modules\@angular\cli\commands\build.js:143:26)
    at Class.<anonymous> (C:\dev\Play Framework\ocd\ui\node_modules\@angular\cli\ember-cli\lib\models\command.js:134:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" "--" "--watch"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! ui@0.0.0 build: `ng build --extract-css --progress --output-path ../public/ui "--watch"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ui@0.0.0 build script 'ng build --extract-css --progress --output-path ../public/ui "--watch"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ng build --extract-css --progress --output-path ../public/ui "--watch"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\dev\Play Framework\ocd\ui\npm-debug.log

It seems the Build Hook can't remove the public/ui directory. If I manually delete such directory, make a clean/compile/run The angular build go further without error.

Somebody have experienced this issue?

Thanks.

Pasquale

@ronniegane
Copy link
Contributor

Could be related to similar errors others have with rimraf:
isaacs/rimraf#25
gruntjs/grunt-contrib-clean#34
isaacs/rimraf#72

Do you have anything that could be watching that directory? An explorer window open, virus scanners and Dropbox syncing are possible options mentioned in the linked issues.

@ppanuccio
Copy link
Author

Actually it seems there isn't anything that is watching the directory (apart of Intellij IDE open). If was the case...it should happen everytime...even after that I manually delete the directory. If I remove such directory and run clean/compile/run, the problem doesn't happen anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants