Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Could not parse alpha in file - Greatly appreciate assistance. #10398


User avatar
0
dexmox created

Hi All,

Thanks in advance for your time and efforts.

9.3 MVC Core JQuery

Issue: This works on work dev machine but not home office machine and errors out as below. Was working 2 days ago, the package json is the same on both machines. The css file is exactly the same on both machines. Yarn lock has same version of jquery ui dist. bundles are the same on both machines.

It is creating the sample-report.min.css on my work machine - not on my home machine.

I am at a loss as to why it works on one and not the other and how to fix it.

Any help again, is greatly appreciated.

Have a safe and wonderful day.

Added to bundles:

{
 "scripts": [
    {
      "output": "view-resources/Areas/App/Views/_Bundles/sample-report.min.js",
      "input": [
        "node_modules/jquery-ui-dist/jquery-ui.js",
        "node_modules/knockout/build/output/knockout-latest.js",
        "node_modules/devextreme/dist/js/dx.all.js",
        "node_modules/@devexpress/analytics-core/dist/js/dx-analytics-core.js",
        "node_modules/devexpress-reporting/dist/js/dx-webdocumentviewer.js"
      ]
    },
  ....
"styles": [
    {
      "output": "/view-resources/Areas/App/Views/_Bundles/sample-report.min.css",
      "input": [
        "node_modules/jquery-ui-dist/jquery-ui.css",
        "node_modules/devextreme/dist/css/dx.common.css",
        "node_modules/devextreme/dist/css/dx.light.css",
        "node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css",
        "node_modules/@devexpress/analytics-core/dist/css/dx-analytics.light.css",
        "node_modules/devexpress-reporting/dist/css/dx-webdocumentviewer.css"
      ]
    },
    ...

added to package.json:

dependencies: [
    "devextreme": "20.2.5",
    "@devexpress/analytics-core": "20.2.5",
    "devexpress-reporting": "20.2.5",
    "jquery-ui-dist": "1.12.1"
]

Error: npm run create bundles:

Bundles are being created, please wait...
[19:51:03] 'buildDev' errored after 5.3 s
[19:51:03] Error in plugin "gulp-less"
Message:
    Could not parse alpha in file C:\*.Web.Mvc\node_modules\jquery-ui-dist\jquery-ui.css line no. 1307
Details:
    type: Syntax
    filename: C:\*.Web.Mvc\node_modules\jquery-ui-dist\jquery-ui.css
    index: 37223
    line: 1307
    column: 23
    callLine: NaN
    callExtract: undefined
    extract:    opacity: .003;, filter: Alpha(Opacity=.3); /* support: IE8 */,}
    lineNumber: 1307
    fileName: C:\*.Web.Mvc\node_modules\jquery-ui-dist\jquery-ui.css
    domainEmitter: [object Object]
    domainThrown: false

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] create-bundles: `yarn && gulp buildDev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] create-bundles script.

Similar / Same Issue : https://stackoverflow.com/questions/54362146/error-in-plugin-gulp-less-could-not-parse-alpha-in-jquery-ui-css


6 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @dexmox

    Do you use yarn or npm for installing packages ? If you used npm, could you remove node_modules folder and use yarn to install packages. If that doesn't work, you can try deletinh yarn.lock file and re-install packages again.

  • User Avatar
    0
    dexmox created

    Hi @ismcagdas,

    Thanks for getting back to me :)

    I have deleted node_modules, tried both npm and yarn seperately - deleted yarn lock and package lock files to ensure clean re-builds.

    I clean installed node.js on my work dev machine and it also failed with same error. Reverting to an earlier node.js/npm version on work machine and then running npm run create-bundles completed without error - but did not re-create the jquery-ui.css file).

    I downloaded a clean ANZ template and imported the same packages then tried npm run create-bundles and it also failed with same error.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you share your Node and NPM versions ? I can try to reproduce this on my environment.

    Thanks,

  • User Avatar
    0
    dexmox created

    @ismcagdas

    Tried Latest LTS Version: 14.17.1 (includes npm 6.14.13) - Failed to build.

    Current Version : 6.14.4 (NPM) Node 13.14.0 - Failed to build.

    Thanks again.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Is it possible for you to share your project via email with [email protected] ?

  • User Avatar
    0
    dexmox created

    Just putting the solution here for anyone else with this issue.

    @ismcagdas said:

    It seems like gulp-less doesn't have a solution for this.

    We suggest you copy the related css file to your wwwroot folder, change its content (remote related line which starts with Alpha ) and use it instead of using it from node_modules.

    As I can see, jquery-ui is not used in AspNet Zero anymore.


    Thanks for the help @ismcagdas :) have a great day!