JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Grid and Table Uncaught ReferenceError
- This topic has 6 replies, 1 voice, and was last updated 4 months, 3 weeks ago by
rahul kumar.
-
AuthorPosts
-
April 27, 2021 at 7:52 pm #101753
emrivera@unmc.edu
MemberI 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″.
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>April 27, 2021 at 9:13 pm #101754admin
KeymasterApril 28, 2021 at 4:08 pm #101761emrivera@unmc.edu
MemberHi 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”.
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,
EricApril 29, 2021 at 4:26 am #101765admin
KeymasterHi Eric,
Which version do you use?
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/April 29, 2021 at 9:32 am #101766yavordashew
MemberHi 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/April 29, 2021 at 12:56 pm #101769emrivera@unmc.edu
MemberOctober 28, 2022 at 7:11 am #103934rahul kumar
ParticipantIf 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)
-
AuthorPosts
- You must be logged in to reply to this topic.