ENOTEMPTY: directory not empty, rmdir

Kaushik Makwana picture Kaushik Makwana · Mar 3, 2019 · Viewed 8.4k times · Source

I am new in NativeScript, I tried to run my HelloWord app using NativeScript and Angular. I connected my android device and then i run command tns run android its how me following error.

Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\Admin\AppData\Local\Temp\runtimeDir11923-7308-1ed73lj.8p03\framework\app\libs\runtime-libs'                          at Object.fs.rmdirSync (fs.js:846:18)

at rmkidsSync (C:\Users\Admin\AppData\Roaming\npm\node_modules\nativescript\node_modules\temp\node_modules\rimraf\rimraf.js:247:11)

at rmdirSync (C:\Users\Admin\AppData\Roaming\npm\node_modules\nativescript\node_modules\temp\node_modules\rimraf\rimraf.js:237:7)

at fixWinEPERMSync (C:\Users\Admin\AppData\Roaming\npm\node_modules\nativescript\node_modules\temp\node_modules\rimraf\rimraf.js:150:5)


at rimrafSync (C:\Users\Admin\AppData\Roaming\npm\node_modules\nativescript\node_modules\temp\node_modules\rimraf\rimraf.js:216:26)    
at C:\Users\Admin\AppData\Roaming\npm\node_modules\nativescript\node_modules\temp\node_moules\rimraf\rimraf.js:245:5

Whats wrong with me? Can you help please ?

Answer

Martin Mtawali picture Martin Mtawali · Mar 4, 2019

you need to run it with admin privileges, inside project folder do //in the search bar type cmd then on cmd right click and select run as administrator then cd /yourProjectDir if you are on win10, then in your project folder on the top left look for the cmd(terminal) icon the one black and one blue, click the blue one andrun tns run android