Output code from dart2js throws exception before it runs my code.
Line of code: $.TimelineTween__linearEase = Z.TransitionFunction_linear$closure();
$ is undefined
Z is dart
Performed in Isolate loading.
mozilla: TypeError: Z.TransitionFunction_linear$closure is not a function
chrome: Object # has no method 'TransitionFunction_linear$closure'
Related
I plan on using vim-plug with NeoVim. So, my init.lua file will have function calls such as
vim.fn['plug#begin'](vim.fn.stdpath('data') .. '/plugged')
vim.fn['plug#']('hoob3rt/lualine.nvim')
However, I don't want to assume vim-plug is definitely installed. I want my init.lua file to degrade gracefully if vim-plug is not installed, rather than throwing an error
E5113: Error while calling lua chunk: Vim:E117: Unknown function: plug#begin
stack traceback:
[C]: in function 'plug#begin'
/Users/andy/.config/nvim/init.lua:8: in main chunk
How can I check if the vim-plug functions exist before attempting to call them?
I tried print(vim.fn['plug#begin']) but that for some reason prints a non-null value: function: 0x0104ba36f0, even though the function doesn't exist.
I tried print(vim.fn['plug#begin']) but that for some reason prints a non-null value: function: 0x0104ba36f0, even though the function doesn't exist.
Presumably it's returning a function that throws the error you are getting. I would thus recommend using pcall:
local success, error = pcall(vim.fn['plug#begin'], vim.fn.stdpath('data') .. '/plugged')
if not success then --[[fail gracefully]] end
caveat: this will catch any error, so you'll probably want to perform some check like if error:find"Unknown function" then ... end to only catch this specific error.
I have reinstalled #nestjs/swagger and swagger-ui-express. All my dependencies are up to date. But I get this error:
applicationConfig.getVersioning is not a function at SwaggerExplorer.exploreRoutePathAndMethod
I have updated metadata tags in tsconfig.ts file as well. After debugging, I can find that the main issue is at line where createDocument function is called from Swagger Module class. Every code line before that works fine.
On console logging, I even could extract the values of config-correctly. However, once the createDocument method is called, the API comes to a crashing halt with the above stated error.
/home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:125
const controllerVersion = this.getVersionMetadata(metatype, applicationConfig.getVersioning());
^
TypeError: applicationConfig.getVersioning is not a function
at SwaggerExplorer.exploreRoutePathAndMethod (/home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:125:87)
at /home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:72:45
at Array.reduce ()
at /home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:71:99
at /home/prasanna/my_project/TapisProject/API/API/node_modules/lodash/lodash.js:13469:38
at /home/prasanna/my_project/TapisProject/API/API/node_modules/lodash/lodash.js:4967:15
at baseForOwn (/home/prasanna/my_project/TapisProject/API/API/node_modules/lodash/lodash.js:3032:24)
at Function.mapValues (/home/prasanna/my_project/TapisProject/API/API/node_modules/lodash/lodash.js:13468:7)
at MapIterator.iteratee (/home/prasanna/my_project/TapisProject/API/API/node_modules/#nestjs/swagger/dist/swagger-explorer.js:71:45)
at MapIterator.next (/home/prasanna/my_project/TapisProject/API/API/node_modules/iterare/src/map.ts:9:39)
need to upgrade #nestjs/core as well –
This line of UI Automation code:
tableView.logElementTree();
gives this:
but then doing this
tableView.cells().logElementTree();
gives me this:
Script threw an uncaught JavaScript error: UIAElementNil is not a function (evaluating 'tableView.cells().logElementTree()')
This worked for another tableView I was working with so what's the difference here? And any suggestions on a fix?
tableView.cells() returns an array of table cells. You will need to pick a cell that you would like to print the log tree of either by name tableView.cells()["cellName"] or by index, tableView.cells()[0]. Or if you want to see the log tree of each cell you can print it in a loop.
When compiling code with dart dart2js, and run in chrome or firefox
void main() {
window.onMouseDown.listen((e) => print(e.clientX));
}
Result:
Uncaught TypeError: undefined is not a function
In Dartium there is no error.
e.client.x should work.
e.clientX was available for a long time but deprecated. Maybe it was removed recently.
When using Angular.dart 0.9.10 with bootstrap 3.1.1, and compiling to Javascript, I get an ugly stacktrace attached below.
The stacktrace is printed in the console any time I for instance focus a textfield or enter some text.
This has worked previously, so I wonder if it is a bug with the shadow_dom implementation?
The app is currently quite simple and works correctly with Dartium. The same issue occurs after javascript compilation in both Firefox and Chrome.
It works when I remove below line from index.html
<script src="packages/shadow_dom/shadow_dom.debug.js"></script>
The stacktrace in pure text:
TypeError {stack: "TypeError: Object # has no method 'getAt…/packages/shadow_dom/shadow_dom.debug.js:2805:28)", message: "Object # has no method 'getAttribute'"}
message: "Object # has no method 'getAttribute'"
stack: "TypeError: Object # has no method 'getAttribute'↵ at Function.Sizzle.attr (http://localhost:8000/bower_components/jquery/dist/jquery.js:1422:9)↵ at Array. (http://localhost:8000/bower_components/jquery/dist/jquery.js:1618:25)↵ at http://localhost:8000/bower_components/jquery/dist/jquery.js:2116:22↵ at superMatcher (http://localhost:8000/bower_components/jquery/dist/jquery.js:2322:12)↵ at select (http://localhost:8000/bower_components/jquery/dist/jquery.js:2483:28)↵ at Function.Sizzle (http://localhost:8000/bower_components/jquery/dist/jquery.js:838:9)↵ at HTMLDocument.jQuery.event.handlers (http://localhost:8000/bower_components/jquery/dist/jquery.js:4416:48)↵ at HTMLDocument.jQuery.event.dispatch (http://localhost:8000/bower_components/jquery/dist/jquery.js:4353:40)↵ at Document.elemData.handle (http://localhost:8000/bower_components/jquery/dist/jquery.js:4057:28)↵ at invoke (http://localhost:8000/packages/shadow_dom/shadow_dom.debug.js:2805:28)"
__proto__: Error
constructor: function TypeError() { [native code] }
name: "TypeError"
stack: undefined
__proto__: d
"TypeError: Object # has no method 'getAttribute'
at Function.Sizzle.attr (http://localhost:8000/bower_components/jquery/dist/jquery.js:1422:9)
at Array. (http://localhost:8000/bower_components/jquery/dist/jquery.js:1618:25)
at http://localhost:8000/bower_components/jquery/dist/jquery.js:2116:22
at superMatcher (http://localhost:8000/bower_components/jquery/dist/jquery.js:2322:12)
at select (http://localhost:8000/bower_components/jquery/dist/jquery.js:2483:28)
at Function.Sizzle (http://localhost:8000/bower_components/jquery/dist/jquery.js:838:9)
at HTMLDocument.jQuery.event.handlers (http://localhost:8000/bower_components/jquery/dist/jquery.js:4416:48)
at HTMLDocument.jQuery.event.dispatch (http://localhost:8000/bower_components/jquery/dist/jquery.js:4353:40)
at Document.elemData.handle (http://localhost:8000/bower_components/jquery/dist/jquery.js:4057:28)
at invoke (http://localhost:8000/packages/shadow_dom/shadow_dom.debug.js:2805:28)"
I am not sure on the exact details why, but angular dart has a boostrap implementation:
https://github.com/akserg/angular.dart.ui
Likely, that one will work better for you.
Best Regards,
Paul