ionic-team / ionic-team/ionic-cli

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

Đang mở
#3,593 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

# 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"
]
}
}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.