Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.2.30 Crashes Hard #285

Open
mike-ward opened this issue Feb 12, 2018 · 12 comments
Open

0.2.30 Crashes Hard #285

mike-ward opened this issue Feb 12, 2018 · 12 comments

Comments

@mike-ward
Copy link

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.

@yoavaa
Copy link
Contributor

yoavaa commented Feb 12, 2018

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?

@frame
Copy link

frame commented Feb 16, 2018

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.

@Zorkeel
Copy link

Zorkeel commented Feb 16, 2018

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.

@frame
Copy link

frame commented Feb 16, 2018

@Zorkeel: You also need to include context-menu.js via <script> tag or add it to your build/pack script.

@Zorkeel
Copy link

Zorkeel commented Feb 16, 2018

@frame: Thanks ! That was the missing part. Works perfectly now.

@mike-ward
Copy link
Author

Why the extra file instead of integrating into the script?

@Daanoz
Copy link

Daanoz commented Feb 21, 2018

And why this breaking change on a patch version increment?

@nazihahmed
Copy link

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

@stevenvachon
Copy link

stevenvachon commented Jun 22, 2018

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!

@ashclarke
Copy link
Contributor

ashclarke commented Oct 16, 2018

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.

@ashclarke
Copy link
Contributor

ashclarke commented Oct 18, 2018

@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:

4. Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

@vipseixas
Copy link

Can't you just put something like require && require('./context-menu.js') inside angular-tree-control.js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants