Issues with Ionic2, Angular2 mobile application - javascript

Iam trying to run a ionic2,angular2 application as per this github link using command ionic serve --lab
https://github.com/chsakell/ionic2-angular2-firebase/issues
Iam getting following error message
TypeError: Cannot read properties of undefined (reading 'annotations')
at ReflectionCapabilities.annotations (http://localhost:8100/build/vendor.js:18711:24)
at Reflector.annotations (http://localhost:8100/build/vendor.js:18829:44)
at NgModuleResolver.resolve (http://localhost:8100/build/vendor.js:15969:44)
at CompileMetadataResolver.getNgModuleMetadata (http://localhost:8100/build/vendor.js:15226:47)
at RuntimeCompiler._compileComponents (http://localhost:8100/build/vendor.js:26691:47)
at RuntimeCompiler.compileModuleAndComponents (http://localhost:8100/build/vendor.js:26629:37)
at RuntimeCompiler.compileModuleAsync (http://localhost:8100/build/vendor.js:26620:21)
at PlatformRef.bootstrapModuleWithZone (http://localhost:8100/build/vendor.js:11187:25)
at PlatformRef.bootstrapModule (http://localhost:8100/build/vendor.js:11169:21)
at Object.176 (http://localhost:8100/build/main.js:30:109)
When I lookup vendor.js it is this line
if (typeOrFunc.annotations) {
I dont know where typeOrFunc is defined..
Any help or pointers pls..Thanks in advance

Related

react-monaco-editor blackout... TypeError: Cannot read property 'pushUndoStop' of undefined

I use "react-monaco-editor" for my project.
import { MonacoDiffEditor } from 'react-monaco-editor';
...
<MonacoDiffEditor
width="1140"
height="520"
language="javascript"
theme="vs-dark"
original={this.props.original}
value={this.props.current}
options={{
renderSideBySide: true,
}}
editorDidMount={this.editorDidMount}
/>
This error can only be viewed after deploy my server.
simpleWorker.js:25 Could not create web worker(s). Falling back to
loading web worker code in main thread, which might cause UI freezes.
Please see https://github.com/microsoft/monaco-editor#faq el #
simpleWorker.js:25 simpleWorker.js:28 You must define a function
MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker el #
simpleWorker.js:28 react-dom.production.min.js:5058 TypeError: Cannot
read property 'pushUndoStop' of undefined
at l.value (diff.js:283)
at ls (react-dom.production.min.js:5163)
at react-dom.production.min.js:6408
at t.unstable_runWithPriority (scheduler.production.min.js:309)
at Ui (react-dom.production.min.js:2816)
at Cl (react-dom.production.min.js:6204)
at cl (react-dom.production.min.js:5895)
at react-dom.production.min.js:2851
at t.unstable_runWithPriority (scheduler.production.min.js:309)
at Ui (react-dom.production.min.js:2816) rs # react-dom.production.min.js:5058
I test in local with nginx, but only serviceWorker warnings logged.
I think that ServiceWorker warnings are http environment in my server.
What is pushUndoStop... I really don't know this error.
help me...
Not sure if you fixed this issue or not by now, since it has been a while, but in case anyone else lands here, I got this issue too. I had v0.20.0 of monaco-editor and v0.35.0 react-monaco-editor which worked fine. Then I updated to v0.23.0 and I ran into this issue as a regression. I then tried v0.25.2 with no change. After that I tried updating react-monaco-editor to the v0.43.0 and the problem stopped happening! I'm thinking it is an issue where they made a change in monaco-editor and if you didn't update react-monaco-editor to a newer version it would break with that error.

Run the webrtc/samples test and I got errs 'Cannot read property serviceKey of undefined', like as the following:

I have trouble to build https://github.com/webrtc/samples in win 7.
I am following the steps of this Doc.
But there are some errors like as the following.
D:\demo\webrtcDemo\samples\test>node server.js
D:\demo\webrtcDemo\samples\test\server.js:20
key: keys.serviceKey,
^
TypeError: Cannot read property 'serviceKey' of undefined
at D:\demo\webrtcDemo\samples\test\server.js:20:14
at D:\demo\webrtcDemo\samples\node_modules\pem\lib\pem.js:278:24
at D:\demo\webrtcDemo\samples\node_modules\pem\lib\pem.js:168:24
at done (D:\demo\webrtcDemo\samples\node_modules\pem\lib\pem.js:78:24)
at D:\demo\webrtcDemo\samples\node_modules\pem\lib\pem.js:91:13
at D:\demo\webrtcDemo\samples\node_modules\pem\lib\pem.js:1044:20
at D:\demo\webrtcDemo\samples\node_modules\pem\lib\pem.js:1027:9
at D:\demo\webrtcDemo\samples\node_modules\pem\lib\pem.js:937:20
at D:\demo\webrtcDemo\samples\node_modules\pem\lib\pem.js:1092:20
at F (D:\demo\webrtcDemo\samples\node_modules\pem\node_modules\which\which.j
s:68:16)
Thanks for any reply ^o^ !!!
I had the same problem and I solved that by installing OpenSSL in my machine.
I was using Windows 10 and this : https://www.youtube.com/watch?v=PYLTtABP1F4 worked for me.
It is important to setup Environment variables. One last step is to setup config.cnf file in Environment Variables. I had xampp so the path for that is "C:\xampp\apache\conf\openssl.cnf".
Set variable name : OPENSSL_CONF
and variable value : C:\xampp\apache\conf\openssl.cnf
In Linux(I used Ubuntu) it is easy, just follow these instructions : https://ubuntuforums.org/showthread.php?t=2110429
and set config.cnf file as per your server.

Error while creating new models from existing `redshift` table in loopback composer

Got the following error while discovering models from existing redshift table.
Oops! Something is wrong
Cannot read property 'toUpperCase' of undefined
Show/hide details
Message: Cannot read property 'toUpperCase' of undefined
Request: /workspace/api/DataSourceDefinitions/server.bl-pgsql/discoverModelDefinition
Staus: 500
TypeError: Cannot read property 'toUpperCase' of undefined
at mysqlDataTypeToJSONType (/home/user/appname/node_modules/loopback-connector-postgresql/lib/discovery.js:349:25)
at /home/user/appname/node_modules/loopback-connector-postgresql/lib/discovery.js:180:20
at Array.map (native)
at callback (/home/user/appname/node_modules/loopback-connector-postgresql/lib/discovery.js:179:17)
at /home/user/appname/node_modules/loopback-datasource-juggler/lib/observer.js:166:22
at doNotify (/home/user/appname/node_modules/loopback-datasource-juggler/lib/observer.js:93:49)
at PostgreSQL.ObserverMixin._notifyBaseObservers (/home/user/appname/node_modules/loopback-datasource-juggler/lib/observer.js:116:5)
at PostgreSQL.ObserverMixin.notifyObserversOf (/home/user/appname/node_modules/loopback-datasource-juggler/lib/observer.js:91:8)
at cbForWork (/home/user/appname/node_modules/loopback-datasource-juggler/lib/observer.js:156:14)
at /home/user/appname/node_modules/loopback-connector/lib/sql.js:413:7
Please find my package.json
I'm working on newly installed loopback app.
My connection with redshift was successful.

Including Angular-UI-Validate in my project

The project uses Angular 1.3 (from a CDN, links removed below) and I'm trying to install Angular-UI-Validate. I have included both in script tags, and in the inspector, I can see that they're both getting retrieved correctly. Still, it seems as if I'm missing something:
Error: [$injector:unpr] http://errors.angularjs.org/1.3.10/$injector/unpr?p0=ui.validateProvider%20%3C-%20ui.validate%20%3C-%20app.runtimeStackAdminController
at Error (native)
at https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:6:417
at https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:38:307
at Object.d [as get] (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:36:308)
at https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:38:381
at d (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:36:308)
at e (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:37:64)
at Object.g.instantiate (https://l***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:37:213)
at b.$get (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:76:318)
at $route.link (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular-route.js:981:26) <div id="ng-view-wrapper" class="container-fluid ng-scope" ng-view="" autoscroll="true">
Am I missing a library that I have to include? Thanks in advance!
You need to load the ui.validate module.
See https://github.com/angular-ui/ui-validate#usage for all instructions.

JCIFS Package Reference Error in Javascript

I am trying to use JCIFS to access file in a shared folder and it works perfectly fine using a java program. But when I try to use this code in a javascript which is embedded in a ant script file I get the below error. I do see the jcifs-1.3.17.jar in the classpath of ANT but still it is complaining of reference error (ReferenceError: "jcifs" is not defined.).
Appreciate your inputs/thoughts on this. Thanks in Advance!!!
2014-07-17 11:41:32,739 ERROR org.apache.bsf.BSFManager - Exception :
java.security.PrivilegedActionException: org.apache.bsf.BSFException: JavaScript Error: Internal Error: org.mozilla.javascript.EcmaError: **ReferenceError: "jcifs" is not defined.**
at java.security.AccessController.doPrivileged(AccessController.java:255)
at org.apache.bsf.BSFManager.exec(BSFManager.java:491)
at org.apache.tools.ant.util.optional.ScriptRunner.executeScript(ScriptRunner.java:100)
at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: org.apache.bsf.BSFException: JavaScript Error: Internal Error: org.mozilla.javascript.EcmaError: ReferenceError: "jcifs" is not defined.
at org.apache.bsf.engines.javascript.JavaScriptEngine.handleError(JavaScriptEngine.java:195)
at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(JavaScriptEngine.java:147)
at org.apache.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:141)
at org.apache.bsf.BSFManager$6.run(BSFManager.java:493)
at java.security.AccessController.doPrivileged(AccessController.java:251)
... 19 more
Need to preface the package name with Packages.
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Scripting_Java#External_Packages_and_Classes

Categories

Resources