Yesterday I updated Angular CLI and core to 8.0.0v. After that I successfully initialized a new app and ran it. Once the app was built and served on localhost:4200 I opened the console and there was an error:
ng.probe is not a function
I tried to research the issue, but there was no relevant info about it.
Actual result:
After ng serve / npm start there is an issue in the console:
Uncaught TypeError: ng.probe is not a function. Current console
state
Current angular
state
Expected result:
No error in the console
If someone is looking for an alternative to:
ng.probe($0)
In Ivy, then please try this:
ng.getComponent($0);
Found it here, https://juristr.com/blog/2019/09/debugging-angular-ivy-console/
Thought I'd add this here for completion.
Note about ng.getComponent: you must focus the component tag ( e.g. <app-my-component> ) in the developer tools elements so that it will be in $0. It doesn't search up the hierarchy for parent components ( like ng.probe does ).
If you're using Augury extension, disable or remove it. then, check the console. I've had the same issue and I removed the Augury.
Augury is having different set of debugging APIs, that's why that error occur.
Yes, augury assumes angular dev mode is active if window.ng exists, but ivy doesn't export probe right now
I have augury but after I disable the extension there is no error anymore.
You could also run without Ivy with this in your tsconfig.app.json
"angularCompilerOptions": { "enableIvy": false }
This is not exactly related to this question, but googling led me here. So, I am leaving the solution to my problem here in hopes that it will help others who face the same problem.
I was getting ng.probe not a function error when I created a angular project using dotnet sdk(version 5.0.300) and ran it locally. The project was using #angular/core v8.2.12, and #angular/cli v8.3.29.
I was able to solve the problem by update these packages using -
ng update #angular/core#8 #angular/cli#8
or
npm run ng update #angular/core#8 #angular/cli#8
Related
Working with amazon-ivs-web-broadcast and running into the issue mentioned above when trying to create the IVSBroadcastClient
import IVSBroadcastClient from "amazon-ivs-web-broadcast";
let client = IVSBroadcastClient.create({
streamConfig: IVSBroadcastClient.BASIC_LANDSCAPE,
ingestEndpoint: streamConfigData?.stream_url,
})
Error message
Any ideas what may be causing this?
Tried passing hard coded values as arguments, and still running into the same error, so not sure what else could be causing this.
EDIT: This issue works fine on my local instance, but when it gets deployed to development, only then I am seeing the error mentioned.
I'm assuming that you are using React for this application (since I have seen this issue myself with React). If so, for now, you'll have to produce your production build with the following command:
npm run build -- --profile
To workaround an issue with the way function names are minified.
I have the test project at https://github.com/ericg-ember-questions/test_computed_sort
I setup the project by doing the following:
Node version: v12.18.1 (npm v6.14.5)
npm install --save-dev ember-cli#3.4
./node_modules/.bin/ember new test_computed_sort
cd test_computed_sort/
./node_modules/.bin/ember install ember-light-table#1.13.2
./node_modules/.bin/ember generate component test-comp
./node_modules/.bin/ember serve
application.hbs
{{test-comp}}
test-comp.hbs
Hello
{{#light-table}}
{{/light-table}}
If I comment out the reference to light-table, no error is generated. However, with it, I see in the console:
media.js:15 Uncaught TypeError: decorator is not a function
at media.js:15:1
at Array.reduce (<anonymous>)
at _applyDecoratedDescriptor (media.js:15:1)
at Module.callback (media.js:240:1)
at Module.exports (loader.js:106:1)
at Module._reify (loader.js:143:1)
at Module.reify (loader.js:130:1)
at Module.exports (loader.js:104:1)
at requireModule (loader.js:27:1)
at Class._extractDefaultExport (index.js:432:1)
What can I do to resolve this error so I can use ember-light-table with this project?
The error kinda hints at this, but it doesn't really make sense unless you're using modern ember -- but you're using 3.4 (thanks for providing that information!!)
The stack in your error is actually very helpful, and here's how you can figure out what the issue is.
I downloaded your reproduction repo (thanks for providing that! reproductions are immensely helpful in debugging!)
I got the same error you did:
The key piece here is the media.js reference.
Clicking into that we see:
that the compiled version of the ember-responsive/services/media file is using decorators --
you have some version of ember-responsive in your app which has decorators.
I saw in your package.json that you're specifying on alder version:
"ember-responsive": "^4.0.2",
this v4 version of ember-responsive only supports ember 3.13 and higher.
Kinda poking around the ember-responsive github, https://github.com/freshbooks/ember-responsive/blob/v3.0.5/config/ember-try.js
I see that the v3 series of ember-responsive supports back to Ember 2.12 -- definitely before decorators before supported.
So downgrading ember-responsive and restarting the app reveals this error:
"Assertion Failed: [ember-light-table] table must be an instance of Table"
this error is documented here: https://github.com/adopted-ember-addons/ember-light-table/issues/726
so it looks like some APIs usage issue.
If you want help figuring that out, feel free to post another question.
My previous builds work fine, but now I'm getting this error when I try to take a build. I don't know how to resolve this error.
If anyone faces the same issue please help me out.
Attempt to invoke virtual method'boolean com.facebook.react.uimanager.FabricViewStateManager.hasStateWrappper()' on a null object reference
I was able to narrow down what was causing the error for me by using adb logcat and tracing the app.
The issue stemmed from both <Input> (from react-native-elements) and <TextInput> (from react-native). Both would cause the error, and the app would run without error if I commented out any Input/TextInput elements in the Componenets.
I wasn't quite able to get it to work with #kangear 's response, but it was close. After a lot of digging and testing, I was able to get the app to work properly with the following line of code in android\app\build.gradle, in dependencies section:
implementation ("androidx.appcompat:appcompat:1.3.1") {
version {
strictly '1.3.1'
}
}
I tried just using implementation 'androidx.appcompat:appcompat:1.3.1', but that wouldn't work either.
Hope this is able to save someone some time, as it took me quite a long time to figure it out!
I had same issue for this.
do not use +
implementation "androidx.appcompat:appcompat:1.4.0-alpha01"
or
implementation "androidx.appcompat:appcompat:+"
Correct way:(lower than 1.4)
implementation "androidx.appcompat:appcompat:1.1.0"
see here: https://github.com/facebook/react-native/issues/31572
update
./gradlew -q app:dependencies > 1.txt
maybe you can see this:
| +--- com.github.AnJiaoDe:TabLayoutNiubility:V1.1.6 | | \--- androidx.appcompat:appcompat:+ -> 1.4.0-alpha01 (*)
3rd lib content a androidx.appcompat:appcompat:+
so you must be:
implementation ('com.github.AnJiaoDe:TabLayoutNiubility:V1.1.6') {
exclude group: 'androidx.appcompat', module: 'appcompat'
}
android/app/build.gradle
paste the following code in dependencies section
implementation ("androidx.appcompat:appcompat:1.3.1") {
version {
strictly '1.3.1'
}
}
Maybe you can update react-native version to 0.68.2.
This worked for me.
Verify Gradle version: 7.0.2
I Solve This Error Simple way.
No.1) create new expo project expo init {yourProjectName}
No.2) Your previous project copy all your create folder and files and copy you will install dependencies command.
No.3) You New Project Paste all folder and files and install all previous dependencies.
Now you run Your Project npm start or yarn start.
I hope your problem solve.
Update: This solution is for those who can't afford to use Appcompat 1.3.1.
Other solutions were not viable for me. Downgrading to appcompat to 1.3.1 is not a good solution. And upgrading to 0.68.2 is also quite an effort.
I instead
forked react-native version that I was on.
made the changes mentioned here
Re-built the ReactAndroid-release.aar by following this
place ReactAndroid-release.aar in android/app/libs
And now you can use Appcompat 1.4.x on any React native version.
Tried on 0.64.3.
I have updated electron to latest in my project because there were some printer issues with that now I am facing this problem which is when I am importing packages to frontend it's throwing this error yet this works without any problems yet this bothers me so much I have searched and found this #1839
yet I can't find anything or i can't understand what should I do now I have tried
app.allowRendererProcessReuse = true;
it removes (in the command line) the errors but it stops working completely and throwing big error in frontend can anyone help me with this
(node:11484) Electron: Loading non-context-aware native module in
renderer:
'\?\C:\Users\admin\Desktop\co-electronupdate\node_modules#serialport\bindings\build\Release\bindings.node'.
This is deprecated, see
https://github.com/electron/electron/issues/18397.
(node:11484) Electron: Loading non-context-aware native module in
renderer:
''\?\C:\Users\admin\Desktop\co-electronupdate\node_modules#serialport\bindings\build\Release\bindings.node'.
This is deprecated, see
https://github.com/electron/electron/issues/18397.
as you can see there is a big discussion going still I can't understand i have 2 quetions
Should I ignore the error
Is there any fix that I can do or should I continue with electron 7.xx
finally, I found my answer if anyone curious about this here's the link
app.allowRendererProcessReuse = false
add this line to main.js
Following is the solution for now, until it can't be changed anymore!
// Make the following changes in main.js
app.whenReady(() => {
app.allowRendererProcessReuse = false
})
I'm a beginner to front-end development and trying to utilize Ember.js for my project. I stumbled upon a great talk by Edward Faulkner about Liquid Fire at EmberConf 2015. It looked incredibly easy to apply and so I decided to give it a try.
My app is using Ember and Ember-Data Canary via ember-cli 0.2.0.
The structure of the app is somewhat like this:
application.hbs
\users
\user
work.hbs
profile.hbs
...
user.hbs
And the part of the router.js file that's responsible for this is:
this.resource('users', function (){
this.resource('users.user', { path: '/:user_id' }, function () {
this.route('work');
this.route('profile');
...
});
});
After I installed the addon with npm install --save-dev liquid-fire, I replaced {{outlet}} in my user.hbs file with {{liquid-outlet}} and added a transitions.js file with some simple transition data:
export default function () {
this.transition(
this.toRoute('users.user'),
this.use('fade')
);
}
But as soon as I navigate to the user page, I get a javascript error:
Uncaught TypeError: Cannot read property 'container' of undefined
Which originates in a liquid-outlet.js file, on line 15:
var View = this.container.lookupFactory("view:liquid-outlet");
I have no idea what I am doing wrong. It seems like there's something with my {{liquid-outlet}} being placed in the wrong place or something, but I've tried moving it elsewhere, with no luck. As soon as I navigate to a template that has {{liquid-outlet}} in it, I get the same error. Please help.
Thank you,
Oleg
This issue has been fixed in liquid fire's master branch. You can get a working build for now by pulling from git with:
npm install ef4/liquid-fire --save-dev
The next release will of course also include the fix.
Check this github issue thread for updates: https://github.com/ef4/liquid-fire/issues/190