Bower component downloads a test folder that throws off Modernizr modules search for a file. The file it finds is in libraries/all/test/caniuse/modernizr.1.7.min.js and is not compatible. I propose a better error message to show where the module is looking for a file or has found an incompatible file. I debugged this by adjusting the drupal error message in modernizr.admin.inc line 106:

drupal_set_message(t("You don't seem to have a custom build of Modernizr installed yet. This page will help generate one for you. Modernizr module is looking here: " . modernizr_get_path() . "."), $modernizr_severity);

Comments

rupl’s picture

I see what you're saying, but I think the fact that the instructions currently say what to do with the file are better for most people who are trying to set the module up. I would assume that the module looks for the file in the same place as it instructs me to put the file.

Are you just using vanilla bower? If you can exclude Modernizr from your bower config and rely on this module's mechanisms for configuring/downloading you will be able to use the rest of the module's features. If you don't, you can probably just uninstall this module and use the copy that bower downloads (which is super-duper old btw).

Also, I don't think it's possible for this to happen with the Libraries API enabled. I would recommend using it alongside the Modernizr module. I am going to make it a hard dependency in the next release. See #2346239: Add hard dependency on Libraries API

rupl’s picture

Category: Bug report » Support request
Status: Active » Closed (works as designed)