ionic-team / ionic-app-scripts

App Build Scripts for Ionic Projects
http://ionicframework.com/
MIT License
608 stars 304 forks source link

"illegal operation on a directory" when you have a directory called "assets/fonts/roboto" #1268

Open AlanAlbuquerque opened 7 years ago

AlanAlbuquerque commented 7 years ago

Short description of the problem:

When running the command ionic cordova build android --prod --release throws the error:

Error: EISDIR: illegal operation on a directory, unlink '/home/{PROJECT_FOLDER}/www/assets/fonts/roboto'

and if I renames the roboto folder to another name it's works fine (in my case I renamed to a random string: b34sadAasFIU).

What behavior are you expecting?

build the project

Steps to reproduce:

  1. start a project
  2. create the folder: "src/assets/fonts/roboto" with any fonts inside and add to css like:
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Condensed Bold'), local('RobotoCondensed-Bold'), local('sans-serif-condensed'), url(../assets/fonts/roboto/b9QBgL0iMZfDSpmcXcE8nPX2or14QGUHgbhSBV1Go0E.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
  1. run the command ionic cordova build android --prod --release
❯ ionic cordova build android --prod --release           ohmybread/git/master ✗
✔ Creating ./www directory for you - done!
[INFO] Running app-scripts build: --prod --platform android --target cordova

[14:08:47]  build prod started ... 
[14:08:47]  clean started ... 
[14:08:47]  clean finished in 1 ms 
[14:08:47]  copy started ... 
[14:08:47]  deeplinks started ... 
[14:08:47]  deeplinks finished in 228 ms 
[14:08:47]  ngc started ... 
[14:08:55]  ngc finished in 7.43 s 
[14:08:55]  preprocess started ... 
[14:08:55]  preprocess finished in 58 ms 
[14:08:55]  webpack started ... 
[14:08:55]  copy finished in 8.07 s 
[14:09:37]  webpack finished in 42.09 s 
[14:09:37]  uglifyjs started ... 
[14:09:37]  sass started ... 
[14:09:39]  sass finished in 2.17 s 
[14:09:39]  cleancss started ... 
[14:09:46]  cleancss finished in 6.72 s 
[14:10:02]  uglifyjs finished in 25.34 s 
[14:10:02]  postprocess started ... 
Error: EISDIR: illegal operation on a directory, unlink '/home/alan/myprojects/ohmybread/www/assets/fonts/roboto'
    at Error (native)

Which @ionic/app-scripts version are you using?


cli packages: (/home/alan/.nvm/versions/node/v6.11.1/lib/node_modules)

    @ionic/cli-utils  : 1.12.0
    ionic (Ionic CLI) : 3.12.0

global packages:

    cordova (Cordova CLI) : 7.0.1 

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : android 6.2.3 ios 4.4.0
    Ionic Framework    : ionic-angular 3.7.1

System:

    Android SDK Tools : 26.0.2
    Node              : v6.11.1
    npm               : 5.4.2 
    OS                : Linux 4.10

Misc:

    backend : pro

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

my guess is that the app-scripts try manage the generated fonts files named roboto in www folder (like roboto.css) and can't handler the folder called "roboto" too

    "dependencies": {
        "@angular/common": "4.4.4",
        "@angular/compiler": "4.4.4",
        "@angular/compiler-cli": "4.4.4",
        "@angular/core": "4.4.4",
        "@angular/forms": "4.4.4",
        "@angular/http": "4.4.4",
        "@angular/platform-browser": "4.4.4",
        "@angular/platform-browser-dynamic": "4.4.4",
        "@ionic-native/app-version": "4.3.1",
        "@ionic-native/core": "4.3.1",
        "@ionic-native/date-picker": "4.3.1",
        "@ionic-native/facebook": "4.3.1",
        "@ionic-native/globalization": "4.3.1",
        "@ionic-native/google-plus": "4.3.1",
        "@ionic-native/is-debug": "4.3.1",
        "@ionic-native/keyboard": "^4.3.1",
        "@ionic-native/network": "4.3.1",
        "@ionic-native/social-sharing": "4.3.1",
        "@ionic-native/splash-screen": "4.3.1",
        "@ionic-native/sqlite": "4.3.1",
        "@ionic-native/status-bar": "4.3.1",
        "@ionic/storage": "2.0.1",
        "@ngx-translate/core": "8.0.0",
        "@ngx-translate/http-loader": "2.0.0",
        "angular2-moment": "1.7.0",
        "angularfire2": "^4.0.0-rc.1",
        "bunyan": "1.8.12",
        "cordova-android": "6.3.0",
        "cordova-ios": "4.5.1",
        "cordova-plugin-add-swift-support": "^1.7.0",
        "cordova-plugin-app-version": "^0.1.9",
        "cordova-plugin-datepicker": "^0.9.3",
        "cordova-plugin-device": "^1.1.6",
        "cordova-plugin-facebook4": "^1.9.1",
        "cordova-plugin-globalization": "^1.0.7",
        "cordova-plugin-googleplus": "^5.1.1",
        "cordova-plugin-inappbrowser": "^1.7.1",
        "cordova-plugin-ionic": "1.1.9",
        "cordova-plugin-is-debug": "^1.0.0",
        "cordova-plugin-network-information": "^1.3.3",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.3",
        "cordova-plugin-whitelist": "^1.3.2",
        "cordova-plugin-wkwebview-engine": "^1.1.3",
        "cordova-plugin-x-socialsharing": "5.2.0",
        "cordova-sqlite-storage": "^2.0.4",
        "es6-promise-plugin": "4.1.1",
        "firebase": "3.6.6",
        "gerador-validador-cpf": "^3.1.1",
        "gl-ionic2-env-configuration": "0.0.18",
        "install": "0.10.1",
        "ionic-angular": "3.7.1",
        "ionic-cache": "2.0.5",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "moment": "2.18.1",
        "npm": "5.4.2",
        "promise-polyfill": "6.0.2",
        "raven-js": "3.18.1",
        "rxjs": "5.4.3",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.18"
    },
    "devDependencies": {
        "@angular/tsc-wrapped": "4.4.4",
        "@ionic/app-scripts": "3.0.0",
        "@types/bunyan": "1.8.3",
        "typescript": "2.5.3",
        "webpack": "3.6.0"
    },

sorry my english xD

danbucholtz commented 7 years ago

Are you on Linux? I cannot recreate on Mac or Windows.

Thanks, Dan

AlanAlbuquerque commented 7 years ago

Yeas, I'm using Lubuntu.

some info:

Linux alan-pc 4.10.0-35-generic #39~16.04.1-Ubuntu SMP Wed Sep 13 09:02:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:   xenial
kensodemann commented 7 years ago

@danbucholtz - I was able to duplicate this on my Ubuntu machine. Let me know if you need any help debugging this.