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
https://support.aspnetzero.com/QA/Questions/9580/How-to-access-the-ASPNET-Zero-private-GitHub-repository
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.
Hi @ismcagdas,
I've managed to work it out =)
Thanks.
Hi,
Dont know if this helps you but I had a similar problem back a while ago - I dont use angular though.
However I cant remember exactly what it was - but fixing the script issue fixed that problem.
I think it was to do with Swal (cant be sure though) hope this helps some.
https://support.aspnetzero.com/QA/Questions/7466/Throwing-And-Displaying-UserFriendlyException-Using-abpservicesapp
@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.
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!
The document in their tutorial is correct. Hope this helps for more clarity
These are the steps I use:
Download updated Framework.
Update Node JS - if required Update Yarn - if required update npm "npm install -g npm@latest" - if required SDK's - if required
Steps :