ionic-team / ionic-team/ionic-cli

Error directory not empty `www\assets\js` on `ionic cordova run`

Abierto
#3,593 0 comentarios 0 reacciones 0 asignados Ver en GitHub
triage
Lenguaje dominante
TypeScript
Estrellas
2k
Forks
682
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

# Bug Report

- Ionic CLI PRO 4.1.2
- Angular CLI: 1.7.3
- cordova 8.0.0
- node v8.12.0
- npm 6.4.1
- Windows 10

Runing `ionic cordova run android --device` I get this response:

```
ENOTEMPTY: directory not empty, rmdir 'C:\Develop\Ionic\myapp\www\assets\js'
Error: ENOTEMPTY: directory not empty, rmdir 'C:\Develop\Ionic\myapp\www\assets\js'
at Object.fs.rmdirSync (fs.js:846:18)
at Observable.rxjs_1.Observable [as _subscribe] (C:\Develop\Ionic\myapp\node_modules\@angular\cli\node_modules\@angular-devkit\core\node\host.js:188:28)
at Observable._trySubscribe (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\Observable.js:43:25)
at Observable.subscribe (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\Observable.js:29:22)
at C:\Develop\Ionic\app\node_modules\rxjs\internal\util\subscribeTo.js:22:31
at Object.subscribeToResult (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\util\subscribeToResult.js:7:45)
at MergeMapSubscriber._innerSub (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\operators\mergeMap.js:75:38)
at MergeMapSubscriber._tryNext (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\operators\mergeMap.js:72:14)
at MergeMapSubscriber._next (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\operators\mergeMap.js:55:18)
at MergeMapSubscriber.Subscriber.next (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\Subscriber.js:64:18)
at Observable._subscribe (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\util\subscribeToArray.js:5:20)
at Observable._trySubscribe (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\Observable.js:43:25)
at Observable.subscribe (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\Observable.js:29:22)
at MergeMapOperator.call (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\operators\mergeMap.js:35:23)
at Observable.subscribe (C:\Develop\Ionic\myapp\node_modules\rxjs\internal\Observable.js:24:22)
at C:\Develop\Ionic\myapp\node_modules\rxjs\internal\util\subscribeTo.js:22:31
[ERROR] An error occurred while running subprocess ng.
```

**Describe the Bug**

That means the CLI is not propertli compiling the app.

I solve this by deleting the file called _js_ manually.

**Steps to Reproduce**
I get this error sometimes when I compile the app.

**Related Code**
Isn't relevant.

**Expected Behavior**
Actualy I dont have expectatives about this issue.

**Additional Context**
This is my pacakage.json

```json
{
"name": "myapp",
"version": "0.2.0",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "~6.1.1",
"@angular/core": "~6.1.1",
"@angular/forms": "~6.1.1",
"@angular/http": "~6.1.1",
"@angular/platform-browser": "~6.1.1",
"@angular/platform-browser-dynamic": "~6.1.1",
"@angular/router": "~6.1.1",
"@ionic-native/bluetooth-serial": "^5.0.0-beta.19",
"@ionic-native/camera": "^5.0.0-beta.19",
"@ionic-native/core": "^5.0.0-beta.19",
"@ionic-native/crop": "^5.0.0-beta.19",
"@ionic-native/facebook": "^5.0.0-beta.19",
"@ionic-native/file": "^5.0.0-beta.19",
"@ionic-native/file-path": "^5.0.0-beta.19",
"@ionic-native/file-transfer": "^5.0.0-beta.19",
"@ionic-native/google-plus": "^5.0.0-beta.19",
"@ionic-native/push": "^5.0.0-beta.19",
"@ionic-native/splash-screen": "^5.0.0-beta.19",
"@ionic-native/status-bar": "^5.0.0-beta.19",
"@ionic/angular": "^4.0.0-beta.8",
"@ionic/storage": "^2.2.0",
"@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "^3.0.1",
"chart.js": "^2.7.2",
"cordova-android": "7.1.1",
"cordova-browser": "5.0.4",
"cordova-plugin-bluetooth-serial": "^0.4.7",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-crop": "^0.4.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-facebook4": "^3.0.0",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-filepath": "^1.4.2",
"cordova-plugin-googleplus": "^5.3.1",
"cordova-plugin-ionic-keyboard": "^2.1.2",
"cordova-plugin-ionic-webview": "^2.1.3",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"core-js": "^2.5.3",
"ngx-image-cropper": "^1.0.2",
"phonegap-plugin-push": "^2.1.3",
"rxjs": "6.2.2",
"rxjs-compat": "^6.3.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/architect": "~0.8.0-rc.1",
"@angular-devkit/build-angular": "~0.8.0-rc.1",
"@angular-devkit/core": "~0.8.0-rc.1",
"@angular-devkit/schematics": "~0.8.0-rc.1",
"@angular/cli": "~6.1.1",
"@angular/compiler": "~6.1.1",
"@angular/compiler-cli": "~6.1.1",
"@angular/language-service": "~6.1.1",
"@ionic/ng-toolkit": "^1.0.0",
"@ionic/schematics-angular": "^1.0.0",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.9.2",
"codelyzer": "~4.4.2",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~2.9.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-bluetooth-serial": {},
"cordova-plugin-camera": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-file": {},
"cordova-plugin-filepath": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "...",
"WEB_APPLICATION_CLIENT_ID": "..."
},
"cordova-plugin-crop": {},
"phonegap-plugin-push": {
"SENDER_ID": "839877088416",
"FCM_VERSION": "11.8.0"
},
"cordova-plugin-facebook4": {
"APP_ID": "...",
"APP_NAME": "...",
"FACEBOOK_ANDROID_SDK_VERSION": "4.36.1"
}
},
"platforms": [
"android",
"browser"
]
}
}
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.