JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Data Grid Grid and Table Uncaught ReferenceError

Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #101753

    I am running the demos for the smart-grid and smart-table;
    –project with grid the APP.COMPONENT.HTML:
    <span class=”tag”><smart-grid</span><span class=”pln”> [</span><span class=”atn”>dataSource</span><span class=”pln”>]</span><span class=”pun”>=</span><span class=”atv”>”dataSource”</span><span class=”pln”> [</span><span class=”atn”>columns</span><span class=”pln”>]</span><span class=”pun”>=</span><span class=”atv”>”columns”</span><span class=”pln”> #</span><span class=”atn”>grid</span> <span class=”atn”>id</span><span class=”pun”>=</span><span class=”atv”>”grid”</span><span class=”tag”>></smart-grid></span>
    <pre class=”prettyprint prettyprinted”><span class=”tag”>
    –project with table the APP.COMPONENT.HTML:
    <smart-table</span><span class=”pln”> #</span><span class=”atn”>table</span> <span class=”atn”>id</span><span class=”pun”>=</span><span class=”atv”>”table”</span><span class=”pln”> [</span><span class=”atn”>dataSource</span><span class=”pln”>]</span><span class=”pun”>=</span><span class=”atv”>”dataSource”</span><span class=”pln”> [</span><span class=”atn”>editing</span><span class=”pln”>]</span><span class=”pun”>=</span><span class=”atv”>”editing”</span><span class=”pln”> [</span><span class=”atn”>keyboardNavigation</span><span class=”pln”>]</span><span class=”pun”>=</span><span class=”atv”>”keyboardNavigation”</span><span class=”pln”>
    [</span><span class=”atn”>sortMode</span><span class=”pln”>]</span><span class=”pun”>=</span><span class=”atv”>”sortMode”</span><span class=”pln”> [</span><span class=”atn”>columns</span><span class=”pln”>]</span><span class=”pun”>=</span><span class=”atv”>”columns”</span><span class=”tag”>></smart-table></span>
    <div id=”moduleTab” class=”ripple tab-item active”>The files APP.COMPONENT.TS,  APP.COMPONENT.CSS, APP.MODULE.TS identical to the demos.  Data is local.</div>
    <div class=”ripple tab-item active”>When running ng serve I get the following error:  Uncaught ReferenceError: regeneratorRuntime is not defined.</div>
    <div class=”ripple tab-item active”></div>
    <div class=”ripple tab-item active”>Here is the log:</div>
    <div class=”ripple tab-item active”>client:55 [WDS] App updated. Recompiling…
    reloadApp.js:50 [WDS] App updated. Reloading…
    Navigated to http://localhost:4200/
    smart.grid.js:2 Uncaught ReferenceError: regeneratorRuntime is not defined
    at smart.grid.js:2
    at Object.5500 (smart.grid.js:2)
    at a (smart.grid.js:2)
    at smart.grid.js:2
    at smart.grid.js:2
    at Object.YyTx (smart.grid.js:2)
    at __webpack_require__ (bootstrap:79)
    at Module.c/Pm (vendor.js:9909)
    at __webpack_require__ (bootstrap:79)
    at Module.ZAI4 (app.module.ts:2)
    (anonymous) @ smart.grid.js:2
    5500 @ smart.grid.js:2
    a @ smart.grid.js:2
    (anonymous) @ smart.grid.js:2
    (anonymous) @ smart.grid.js:2
    YyTx @ smart.grid.js:2
    __webpack_require__ @ bootstrap:79
    c/Pm @ vendor.js:9909
    __webpack_require__ @ bootstrap:79
    ZAI4 @ app.module.ts:2
    __webpack_require__ @ bootstrap:79
    zUnb @ app-routing.module.ts:8
    __webpack_require__ @ bootstrap:79
    0 @ main.js:11
    __webpack_require__ @ bootstrap:79
    checkDeferredModules @ bootstrap:45
    webpackJsonpCallback @ bootstrap:32
    (anonymous) @ main.js:1
    zone-evergreen.js:2863 XHR finished loading: GET “http://localhost:4200/sockjs-node/info?t=1619551670131&#8243;.
    scheduleTask @ zone-evergreen.js:2863
    scheduleTask @ zone-evergreen.js:393
    scheduleTask @ zone-evergreen.js:221
    scheduleMacroTask @ zone-evergreen.js:244
    scheduleMacroTaskWithCurrentZone @ zone-evergreen.js:679
    (anonymous) @ zone-evergreen.js:2896
    proto.<computed> @ zone-evergreen.js:975
    AbstractXHRObject._start @ sockjs.js:1609
    (anonymous) @ sockjs.js:1498
    timer @ zone-evergreen.js:2561
    invokeTask @ zone-evergreen.js:406
    runTask @ zone-evergreen.js:178
    invokeTask @ zone-evergreen.js:487
    ZoneTask.invoke @ zone-evergreen.js:476
    data.args.<computed> @ zone-evergreen.js:2541
    setTimeout (async)
    scheduleTask @ zone-evergreen.js:2543
    scheduleTask @ zone-evergreen.js:393
    scheduleTask @ zone-evergreen.js:221
    scheduleMacroTask @ zone-evergreen.js:244
    scheduleMacroTaskWithCurrentZone @ zone-evergreen.js:679
    (anonymous) @ zone-evergreen.js:2585
    proto.<computed> @ zone-evergreen.js:975
    AbstractXHRObject @ sockjs.js:1497
    XHRLocalObject @ sockjs.js:2918
    InfoAjax @ sockjs.js:356
    InfoReceiver._getReceiver @ sockjs.js:536
    InfoReceiver.doXhr @ sockjs.js:556
    (anonymous) @ sockjs.js:525
    setTimeout (async)
    InfoReceiver @ sockjs.js:524
    SockJS @ sockjs.js:734
    SockJSClient @ SockJSClient.js:43
    initSocket @ socket.js:20
    (anonymous) @ client:176
    QM51 @ polyfills.js:2400
    __webpack_require__ @ bootstrap:79
    1 @ index.js:4
    __webpack_require__ @ bootstrap:79
    checkDeferredModules @ bootstrap:45
    webpackJsonpCallback @ bootstrap:32
    (anonymous) @ polyfills.js:1
    client:52 [WDS] Live Reloading enabled.</div>
    <div class=”ripple tab-item active”></div>
    <div class=”ripple tab-item active”>Any clue of what is wrong.</div>
    <div class=”ripple tab-item active”></div>
    <div class=”ripple tab-item active”>Thanks,</div>
    <div class=”ripple tab-item active”></div>
    <div class=”ripple tab-item active”></div>
    <pre class=”prettyprint prettyprinted”><span class=”tag”> </span>

    #101754
    admin
    Keymaster

    Hi,
    We are not able to reproduce this with the current version. Please, check whether you use the latest version and share more details about your test.
    Regards,
    Peter
    Smart UI Team
    Htmlelements.com

    #101761

    Hi Peter:
    Thank you for your prompt response.
    I just followed the instructions in the page Using with Angular CLI here https://www.htmlelements.com/docs/angular-cli/
    After I added the smart-webcomponent-angular to the newly created project I proceeded to add the import for the GridModule in the app.module.ts and saved the file. Then I ran ng serve with only modifying app.module.ts, no other files were modified.  The error showed.
    Here is the error log:
    Navigated to http://localhost:4200/
    localhost/:12 GET http://localhost:4200/styles.css net::ERR_CACHE_READ_FAILURE 200 (OK)
    zone-evergreen.js:2863 XHR finished loading: GET “http://localhost:4200/sockjs-node/info?t=1619625912635&#8221;.
    scheduleTask @ zone-evergreen.js:2863
    scheduleTask @ zone-evergreen.js:393
    scheduleTask @ zone-evergreen.js:221
    scheduleMacroTask @ zone-evergreen.js:244
    scheduleMacroTaskWithCurrentZone @ zone-evergreen.js:679
    (anonymous) @ zone-evergreen.js:2896
    proto. @ zone-evergreen.js:975
    AbstractXHRObject._start @ sockjs.js:1609
    (anonymous) @ sockjs.js:1498
    timer @ zone-evergreen.js:2561
    invokeTask @ zone-evergreen.js:406
    runTask @ zone-evergreen.js:178
    invokeTask @ zone-evergreen.js:487
    ZoneTask.invoke @ zone-evergreen.js:476
    data.args. @ zone-evergreen.js:2541
    setTimeout (async)
    scheduleTask @ zone-evergreen.js:2543
    scheduleTask @ zone-evergreen.js:393
    scheduleTask @ zone-evergreen.js:221
    scheduleMacroTask @ zone-evergreen.js:244
    scheduleMacroTaskWithCurrentZone @ zone-evergreen.js:679
    (anonymous) @ zone-evergreen.js:2585
    proto. @ zone-evergreen.js:975
    AbstractXHRObject @ sockjs.js:1497
    XHRLocalObject @ sockjs.js:2918
    InfoAjax @ sockjs.js:356
    InfoReceiver._getReceiver @ sockjs.js:536
    InfoReceiver.doXhr @ sockjs.js:556
    (anonymous) @ sockjs.js:525
    setTimeout (async)
    InfoReceiver @ sockjs.js:524
    SockJS @ sockjs.js:734
    SockJSClient @ SockJSClient.js:43
    initSocket @ socket.js:20
    (anonymous) @ client:176
    QM51 @ polyfills.js:2400
    __webpack_require__ @ bootstrap:79
    1 @ index.js:4
    __webpack_require__ @ bootstrap:79
    checkDeferredModules @ bootstrap:45
    webpackJsonpCallback @ bootstrap:32
    (anonymous) @ polyfills.js:1
    smart.grid.js:2 Uncaught ReferenceError: regeneratorRuntime is not defined
    at smart.grid.js:2
    at Object.5500 (smart.grid.js:2)
    at a (smart.grid.js:2)
    at smart.grid.js:2
    at smart.grid.js:2
    at Object.YyTx (smart.grid.js:2)
    at __webpack_require__ (bootstrap:79)
    at Module.c/Pm (vendor.js:9885)
    at __webpack_require__ (bootstrap:79)
    at Module.ZAI4 (app.module.ts:2)
    (anonymous) @ smart.grid.js:2
    5500 @ smart.grid.js:2
    a @ smart.grid.js:2
    (anonymous) @ smart.grid.js:2
    (anonymous) @ smart.grid.js:2
    YyTx @ smart.grid.js:2
    __webpack_require__ @ bootstrap:79
    c/Pm @ vendor.js:9885
    __webpack_require__ @ bootstrap:79
    ZAI4 @ app.module.ts:2
    __webpack_require__ @ bootstrap:79
    zUnb @ main.js:473
    __webpack_require__ @ bootstrap:79
    0 @ main.js:11
    __webpack_require__ @ bootstrap:79
    checkDeferredModules @ bootstrap:45
    webpackJsonpCallback @ bootstrap:32
    (anonymous) @ main.js:1
    client:52 [WDS] Live Reloading enabled.
    Any idea why this is happening?
    Thanks,
    Eric

    #101765
    admin
    Keymaster

    Hi Eric,
    Which version do you use?
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

    #101766
    yavordashew
    Member

    Hi Eric,
    We have evaluated the issue and we have released a new version of smart-webcomponents-angular(9.3.33) this morning which fixes this error.
    You only have to update to the newest version with the following command: npm update smart-webcomponents-angular
    Please, do not hesitate to contact us if you have any additional questions.
    Best regards,
    Yavor Dashev
    Smart UI Team
    https://www.htmlelements.com/

    #101769

    Hi Yavor:
    Problem solved.
    Thanks,
    Eric

    #103934
    rahul kumar
    Participant

    If you are using any script file and getting “Uncaught ReferenceError: x is not defined ” which means ‘x’ is either a variable or a method which you are trying to use before declaring it using var keyword. This means that there is a non-existent variable referenced somewhere. This variable needs to be declared, or you need to make sure it is available in your current script or scope otherwise , it will endup throwing this ‘x’ is not defined error . This usually indicates that your library is not loaded and JavaScript does not recognize the ‘x’.

    To solve this error: Load your library at the beginning of all your scripts.

    There can be multiple other reasons for this issue:

    • Conflict with Other Libraries
    • Path to your library included is not correct
    • Llibrary file is corrupted
    • Working offline (when you use CDN)

     

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.