angular-tree-control
angular-tree-control copied to clipboard
0.2.30 Crashes Hard
Been using this control for several years and really like it. However, upgrading from 0.2.28 to 0.2.30 crashes my app. I'm not getting any feedback in the console. My app simply doesn't load. This is usually indicative of a null reference to an expected object. Wish I had more but I'm on a deadline right now.
Running AngularJS 1.6.9, any browser reproduces the issue.
Did you include the context-menu.js file? we have merged a pull request a few days ago that added this support.
@stueynz can you have a look?
Not sure if related. When I use 0.2.30 with context-menu.js, I get the following exception:
[$injector:strictdi] function(e) is not using explicit annotation and cannot be invoked in strict mode
When I revert back to 0.2.28, everything works again. My apologies if this comment isn't related to the crash OP reported.
Hi,
Same problem here since last update. The angular App won't build, and I have this error in the console:
Error: [$injector:modulerr] Failed to instantiate module app due to:
[$injector:modulerr] Failed to instantiate module treeControl due to:
[$injector:modulerr] Failed to instantiate module contextMenu due to:
[$injector:nomod] Module 'contextMenu' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.6.9/$injector/nomod?p0=contextMenu
minErr/<@http://localhost:3043/build/bundle.js:71596:12
module/<@http://localhost:3043/build/bundle.js:73783:17
ensure@http://localhost:3043/build/bundle.js:73704:38
module@http://localhost:3043/build/bundle.js:73781:14
loadModules/<@http://localhost:3043/build/bundle.js:76479:22
forEach@http://localhost:3043/build/bundle.js:71888:11
loadModules@http://localhost:3043/build/bundle.js:76463:5
loadModules/<@http://localhost:3043/build/bundle.js:76481:40
forEach@http://localhost:3043/build/bundle.js:71888:11
loadModule…
I've checked, the context-menu.js file is present in the node_modules\angular-tree-control\ folder.
@Zorkeel: You also need to include context-menu.js via
@frame: Thanks ! That was the missing part. Works perfectly now.
Why the extra file instead of integrating into the script?
And why this breaking change on a patch version increment?
our huge codebase depends on this and now you broke our build.. really why in a patch increment? please make sure not to make the same mistake again
The readme says that the context menu script is optional if not using the menu-id attribute, which I am not.
I think the author doesn't understand semver, which is critical information for a JS developer. I hope they educate themselves soon!
If you don't want to add the context menu, and its js file, add this workaround to your existing module definitions:
angular.module("contextMenu", []);
And carry on as normal.
@stevenvachon
I think the author doesn't understand semver, which is critical information for a JS developer. I hope they educate themselves soon!
From SemVer spec:
Can't you just put something like require && require('./context-menu.js') inside angular-tree-control.js?