Trying to integrate Angular 4 + #ngx-translate. Everything is executing and working properly with npm start. Problem arises when I tries to npm test run Karma test cases. All these started after adding #ngx-translate capabilities.
Console get below error:
20 09 2017 14:24:30.334:INFO [Chrome 60.0.3112 (Windows 7 0.0.0)]: Connected on socket n1uvSjMzMfCGU26zAAAA with id 7587189
Chrome 60.0.3112 (Windows 7 0.0.0) ERROR
Uncaught TypeError: Cannot read property 'Injectable' of undefined
at node_modules/#ngx-translate/core/bundles/core.umd.js:817
On browser console:
Uncaught TypeError: Cannot read property 'Injectable' of undefined
at Object.<anonymous> (core.umd.js:817)
at __webpack_require__ (core.umd.js:30)
at Object.module.exports (core.umd.js:1421)
at __webpack_require__ (core.umd.js:30)
at module.exports (core.umd.js:76)
at core.umd.js:79
at webpackUniversalModuleDefinition (core.umd.js:9)
at core.umd.js:10
ng-bootstrap.js:9 Uncaught TypeError: Cannot read property 'core' of undefined
at webpackUniversalModuleDefinition (ng-bootstrap.js:9)
at ng-bootstrap.js:10
On browser:
OtherComponent when inside a test host should process Instance name
TypeError: Cannot read property 'bpmWrapWorkItemList' of undefined
TypeError: Cannot read property 'bpmWrapWorkItemList' of undefined
Please help !!! I am new to Angular 4..
Please put beforeEach block to update language for translateservice
beforeEach(inject([TranslateService], (service: TranslateService) => {
service.use('de');
}));
I had a similar issue, and was able to resolve the problem by removing two script definitions in .angular-cli.json.
I replaced
"scripts": [
"../node_modules/#ngx-translate/core/bundles/core.umd.js",
"../node_modules/#ngx-translate/http-loader/bundles/http-loader.umd.js"
],
with
"scripts": [],
While this resolves the problem, and the translate service still works, I do not know why those scripts are required in the first place, and if it's okay to remove them.
Related
I deploy my next.js app in cPanel. The app is working properly in localhost but in cPanel it shows error of
TypeError: Cannot read properties of null (reading 'content')
at main-aff9f5cd95c9bd16.js:1:10552
at main-aff9f5cd95c9bd16.js:1:11029
at Array.forEach (<anonymous>)
at Object.updateHead (main-aff9f5cd95c9bd16.js:1:10400)
at Object.t [as _pendingUpdate] (main-aff9f5cd95c9bd16.js:1:90322)
at main-aff9f5cd95c9bd16.js:1:90761
at ri (framework-4556c45dd113b893.js:1:93730)
at Ss (framework-4556c45dd113b893.js:1:113957)
at is (framework-4556c45dd113b893.js:1:106214)
at jl (framework-4556c45dd113b893.js:1:46913)
I am disturbed by this error because I am not using any content variable in my project. I don't know from where this error is occurred. Kindly tell me how to solve this error.
How the problem arises:
Access to vite in the project, an error is reported when running vite
Error corresponding file:
return crypto.randomBytes(Math.ceil(len / 2)).toString('hex').slice(0, len); //This line reports an error in /node_modules/.vite/unique-string.js
Run framework, version:
vue2.6.12、vue-cli4、vite2.5.5 (The latest version does not work too)
Ask for advice~~
After upgrading to RN 0.62.2 from 0.61.3 using the RN tools for upgrading, updating pod (even had to modify a line in podspec following this to make it work : CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":)
My app build but get stuck on the splashscreen. It's working well on RN 0.61.3
This is what i have in the metro console :
[Wed Apr 22 2020 18:22:25.108] WARN Require cycle: node_modules/react-native-af-video-player/components/index.js -> node_modules/react-native-af-video-player/components/TopBar.js -> node_modules/react-native-af-video-player/components/index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
[Wed Apr 22 2020 18:22:25.108] LOG Unable to symbolicate stack trace: Unable to resolve data for blob: (null)
[Wed Apr 22 2020 18:22:25.109] LOG Running "gamefare" with {"rootTag":151,"initialProps":{}}
[Wed Apr 22 2020 18:22:25.122] LOG Unable to symbolicate stack trace: Unable to resolve data for blob: (null)
Anyone running in the same issue and any idea on how i can debug that ?
I tried deleting node modules and reinstall everything it does not solve the problem.
When i console log from my index.js i have nothing.
EDIT : This is the full error i have in Xcode :
2020-04-24 16:46:00.478 [error][tid:com.facebook.react.JavaScript] TypeError: Object is not a constructor (evaluating 'new _reactNative.TextInput()')
2020-04-24 16:46:00.481 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: TypeError: Object is not a constructor (evaluating 'new _reactNative.TextInput()')
2020-04-24 16:46:00.490 [info][tid:com.facebook.react.JavaScript] Running "gamefare" with {"rootTag":1,"initialProps":{}}
2020-04-24 16:46:00.490 [error][tid:com.facebook.react.JavaScript] Invariant Violation: "gamefare" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
2020-04-24 16:46:00.498 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Invariant Violation: "myAppName" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
2020-04-24 16:46:00.594 [info][tid:com.facebook.react.JavaScript] Unable to symbolicate stack trace: Unable to resolve data for blob: (null)
2020-04-24 16:46:00.604 [info][tid:com.facebook.react.JavaScript] Unable to symbolicate stack trace: Unable to resolve data for blob: (null)
Finally after some search, i had to disable page per page all my component to see what was the cause of the problem. It appear that this package i was using : react-native-confirmation-code-fieldneeded to be updated ! (the maintainer was aware of the problem with RN 0.62 and updated it, thanks to him !
I also needed to update reac-native-firebase if someone run into the same problem and use those modules.
The best way to debug is to do bit by bit by removing everything and added all the piece back together component per component when log in console are not clear
I am working on augmenting the example found here. So first of all it works great if I call npm start. Now I wanted to try and get it to work with an existing ExpressJS project. To do this in a quick and dirty way I copy the three js files to the ./public/javascripts folder and create the following index.jade...
extends layout
block content
my-app Loading....
script(type="text/javascript", src="http://localhost:3000/javascripts/polyfills.js")
script(type="text/javascript", src="http://localhost:3000/javascripts/vendor.js")
script(type="text/javascript", src="http://localhost:3000/javascripts/app.js")
but now I get....
Error: Uncaught (in promise): Failed to load %5Bobject%20Object%5D
at resolvePromise (zone.js:538)
at PromiseCompleter.reject (zone.js:515)
at application_ref.js:349
at ZoneDelegate.invoke (zone.js:323)
at Object.NgZoneImpl.inner.inner.fork.onInvoke (ng_zone_impl.js:48)
at ZoneDelegate.invoke (zone.js:322)
at Zone.run (zone.js:216)
at zone.js:571
at ZoneDelegate.invokeTask (zone.js:356)
at Object.NgZoneImpl.inner.inner.fork.onInvokeTask (ng_zone_impl.js:39)
at ZoneDelegate.invokeTask (zone.js:355)
at Zone.runTask (zone.js:256)
at drainMicroTaskQueue (zone.js:474)
at XMLHttpRequest.ZoneTask.ZoneTask.cancelFn.invoke (zone.js:426)
zone.js:461 Unhandled Promise rejection: Failed to load %5Bobject%20Object%5D ; Zone: angular ; Task: Promise.then ; Value: Failed to load %5Bobject%20Object%5DconsoleError # zone.js:461_loop_1 # zone.js:490drainMicroTaskQueue #zone.js:494ZoneTask.ZoneTask.cancelFn.invoke # zone.js:426
Current project is available here
So for some reason this worked with the built in webpack server
styleUrls: [String(require('./navbar.component.styl'))]
This of course should be
styles: [String(require('./navbar.component.styl'))]
I've simply installed the aurelia-dialog plugin, version 1.0.0-beta.1.1.0, and registered it with aurelia, but I'm getting an error:
aurelia.use
.plugin('aurelia-dialog');
dialog-configuration.js:65 Uncaught (in promise) TypeError: _aureliaPal.DOM.injectStyles is not a function(…)
_apply # dialog-configuration.js:65
configure # aurelia-dialog.js:73
(anonymous function) # aurelia-framework.js:272
I just experienced the same problem - solved it by running "jspm update", which caused several aurelia packages to be updated from beta-1.2.1 or beta-1.2.2 to rc-1.0.0 and added various other packages. Hence, the problem seems to be caused by some kind of version conflict.