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

RAD Tool producing javascript that gulp rejects #8099


User avatar
0
dmux created

I am using Visual Studio 16.3.10, because I udpated 16.4 Preview 4 to Preview 6 and it seemed to cause serious problems. So I uninstalled it and went back to the released version. Then I installed the RAD Tool (2.1).

My project is ASPNETCore MVC v8.0

I have just discovered that the RAD tool is now producing sections of javascript that gulp rejects. As far as I can tell the offending code is in the datatable listAction in the generated index.js, where it is defining the inputFilter parameters for the query. It looks like it is putting placeholders in and not substituting values.

Original code (produced previously by RAD tool):

        var dataTable = _$productsTable.DataTable({
            paging: true,
            serverSide: true,
            processing: true,
            listAction: {
                ajaxFunction: _productsService.getAll,
                inputFilter: function () {
                    return {
					filter: $('#ProductsTableFilter').val(),
					codeFilter: $('#CodeFilterId').val(),
					nameFilter: $('#NameFilterId').val(),
					chemCheckFilter: $('#ChemCheckFilterId').val(),
					minMultiPartyMeetingsFilter: $('#MinMultiPartyMeetingsFilterId').val(),
					maxMultiPartyMeetingsFilter: $('#MaxMultiPartyMeetingsFilterId').val(),
					midpointReviewFilter: $('#MidpointReviewFilterId').val(),
					finalReviewFilter: $('#FinalReviewFilterId').val(),
					progressReportsFilter: $('#ProgressReportsFilterId').val(),
					programTypeNameFilter: $('#ProgramTypeNameFilterId').val()
                };
              }
           },

Code being produced now:

var dataTable = _$productsTable.DataTable({
            paging: true,
            serverSide: true,
            processing: true,
            listAction: {
                ajaxFunction: _productsService.getAll,
                inputFilter: function () {
                    return {
					filter: $('#ProductsTableFilter').val(),
					{{Dp_Property_Name_Here}}Filter: $('#CodeFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#NameFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#ChemCheckFilterId').val(),
					minMultiPartyMeetingsFilter: $('#MinMultiPartyMeetingsFilterId').val(),
					maxMultiPartyMeetingsFilter: $('#MaxMultiPartyMeetingsFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#MidpointReviewFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#FinalReviewFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#ProgressReportsFilterId').val(),
					minConsultationsFilter: $('#MinConsultationsFilterId').val(),
					maxConsultationsFilter: $('#MaxConsultationsFilterId').val(),
					minHoursFilter: $('#MinHoursFilterId').val(),
					maxHoursFilter: $('#MaxHoursFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#MoodleAccessFilterId').val(),
					programTypeNameFilter: $('#ProgramTypeNameFilterId').val()
                    };
                }
            },

It seems the int data types have their filter names, but the string and bool data types have this {{Dp_Property_Name_Here}} placeholder instead.

It seems this is what causes npm run build to throw an error:

npm : [22:27:44] 'build' errored after 3.41 s At line:1 char:1 npm run build

  • CategoryInfo : NotSpecified: ([22:27:44...ed after 3.41 s:String) [], RemoteException
  • FullyQualifiedErrorId : NativeCommandError [22:27:44] SyntaxError in plugin "gulp-uglify-es" Message: Unexpected token: punc ({) Details: filename: Index.js line: 48 col: 5 pos: 1747 domainEmitter: [object Object] domain: [object Object] domainThrown: false

I can confirm that when I replace the {{Dp_Property_Name_Here}} with the appropriate filter name, I can then run npm run build.

So this is now a manual step I need to take any time I run the RAD tool. Any help to resolve it will be appreciated.

Any ideas how I can overcome this?


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

    Thanks @dmux

    We are checking the issue.

  • User Avatar
    1
    yekalkan created

    Hi @dmux,

    We've fixed the issue.

    You can upgrade to v2.1.0.1 which is released now.

  • User Avatar
    1
    dmux created

    Wow! Cool.

    Thanks so much. Just updated and tried it out, and everything works. Great job.

    By the way, this RAD tool is the reason I purchased ASPNetZero instead of building on ABPBoilerplate. Both the RAD tool itself and also the other features in ASPNetZero are well worth the price, but it was the RAD tool that sold me.