Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Reference to undeclared variable - building package with 6.0.1

    You found a bug! We've classified it as SDKTOOLS-1296 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Jan 2010
    Posts
    60
    Vote Rating
    10
      0  

    Default Reference to undeclared variable - building package with 6.0.1

    Just downloaded ExtJs 6.0.1 and Sencha Cmd 6.0.1
    Generated a new workspace
    sencha generate package --type CODE wtf
    Edit package.json and set "framework": "ext" and "toolkit": "classic"

    Now try sencha package build

    Code:
    [INF] Building ..\..\build\wtf-all-debug.scss
    [INF] Build error for ..\..\build\wtf-all-debug.scss
    [ERR] Error: Reference to undeclared variable : $font_icon_font_family at : C:\dev\work601/ext/packages/core/sass/var/list/TreeItem.scss:57
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExBuild: Error: Reference to undeclared variable : $font_icon_font_family at : http://localhost:1841/ext/package
    s/core/sass/var/list/TreeItem.scss:57
    [ERR]   at com.sencha.ant.An
    [ERR] tScript.execute(AntScript.java:116)
    [ERR]
    [ERR] Total time: 5 seconds
    [ERR] The following error occurred while executing this line:
    C:\dev\work601\packages\local\wtf\.sencha\package\build-impl.xml:188: The following error occurred while executing this line:
    C:\dev\work601\packages\local\wtf\.sencha\package\sass-impl.xml:263: The following error occurred while executing this line:
    C:\dev\work601\packages\local\wtf\.sencha\package\sass-impl.xml:206: The following error occurred while executing this line:
    C:\dev\work601\packages\local\wtf\.sencha\package\sass-impl.xml:245: com.sencha.exceptions.ExBuild: Error: Reference to undeclared variable
     : $font_icon_font_family at : http://localhost:1841/ext/packages/core/sass/var/list/TreeItem.scss:57

  2. #2

    Join Date
    Jun 2013
    Posts
    29
    Vote Rating
    1
      0  

    Default

    +1 : Same error

  3. #3
    Sencha Premium User
    Join Date
    Jun 2008
    Posts
    132
    Vote Rating
    11
      0  

    Default

    I am seeing the exact same error - but for me it's happening with an application that I just upgraded from Ext5 to 6.0.1 (via sencha upgrade etc...). Anyone have a solution?

  4. #4
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    956
    Vote Rating
    21
      4  

    Default

    Thanks for all the info on this, I've submitted a bug report and this will be corrected on a future release.


    Now for a workaround.


    Option 1- (preferred if you want a particular theme)
    --In your package.json you'll need to define a theme:
    "theme":"theme-classic" | theme-neptune | theme-triton

    ***More details than be described but stems from the inheritance of themes and way in which scss files are loaded.

    Option 2 - (preferred if you want just basic non-themed package)
    --Add the following lines to packages/.sencha/sencha.cfg
    skip.sass=1
    skip.slice=1


    Option 3-
    --Add the following line to sass/etc/all.scss
    $font-icon-font-family: dynamic(FontAwesome);


    Hope this helps!
    Bryan

  5. #5

    Join Date
    Jun 2013
    Posts
    29
    Vote Rating
    1
      0  

    Default

    Thanks!

    I confirm for Option 3!

  6. #6
    Sencha Premium Member jamesjara's Avatar
    Join Date
    Apr 2009
    Location
    costa rica
    Posts
    62
    Vote Rating
    1
      0  

    Default

    Reconfirmed, option 3 more cleaner, thanks a lot
    SB.... will see

  7. #7
    Sencha User
    Join Date
    Nov 2015
    Posts
    1
    Vote Rating
    0
      0  

    Default

    If "charts" package is set as dependency, then build fails with this error
    Code:
    [ERR] Error: Reference to undeclared variable : $button_medium_border_radius at :  [workspace]/ext/packages/charts/classic/sass/var/chart/AbstractChart.scss:1[ERR] [ERR] BUILD FAILED[ERR] com.sencha.exceptions.ExBuild: Error: Reference to undeclared variable : $button_medium_border_radius at : http://localhost:1841/ext/packages/charts/classic/sass/var/chart/AbstractChart.scss:1[ERR] 	at org.apache.tools.ant.Project.executeSort[ERR] edTargets(Project.java:1399)

  8. #8
    Sencha Premium User
    Join Date
    Jan 2014
    Location
    Fort Worth, TX, USA
    Posts
    61
    Vote Rating
    4
      0  

    Default

    Any updates on a fix for this?

  9. #9
    Sencha Premium Member
    Join Date
    Apr 2015
    Posts
    18
    Vote Rating
    1
      0  

    Default Sencha Cmd 6.0.2.14

    Same problem here, this time with undeclared variable:
    $conditional_panel_header_background_color

    (extending ext-theme-neptune)

    [edit] and the most annoying thing is: I cannot find this variable neither in the docs nor in the SDK for the life of me.

    [edit2] alright, there's a variable called $conditional-panel-header-background-color in a scss I am importing. By magic, Sencha Cmd changed the variable name.

  10. #10
    Sencha Premium Member
    Join Date
    Apr 2015
    Posts
    18
    Vote Rating
    1
      0  

    Default

    The issue is resolved for me.
    Problem was in an imported scss file: for some reason, Fashion does not scope all variables inside functions as expected. Some vars that have been declared outside functions (as $varname: value !default) are not accessible inside the function (whereas others are). I gave up on finding out why (Sencha Cmd's error messages are horrifiying) and just pass those vars as arguments. Whatever.

Page 1 of 2 12 LastLast

Similar Threads

  1. Overriding forced "string" format for a config variable? I want a variable reference
    By Necro-Engineering in forum Sencha Architect 3.x: Q&A
    Replies: 4
    Last Post: 24 Jun 2014, 7:16 AM
  2. [FIXES=916][3.2.1] Undeclared variable in GroupingStore
    By kisjonnk in forum Ext 3.x: Bugs
    Replies: 2
    Last Post: 29 Apr 2010, 8:05 AM
  3. Replies: 1
    Last Post: 9 Oct 2008, 7:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •