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

problems with modernizr #605

Closed
introvert opened this issue Nov 21, 2016 · 3 comments
Closed

problems with modernizr #605

introvert opened this issue Nov 21, 2016 · 3 comments
Assignees
Labels

Comments

@introvert
Copy link

Hello,

I'm experiencing problems with modernizr when the library is built using the webapp approach.

When I deploy the site, I'm unable to scroll the page and I get the following error:
modernizr.a9ab48a0.js:1 Uncaught TypeError: Cannot read property 'sheet' of null

It looks like something breaks the library after it gets built.

Any idea what this happens? It started appearing when I started using gulp-rev-all

It also seems that webapp is using outdated approaches with using the modernizer (the version included is 2.8.3). Any future plans for caregiving into this?

@introvert introvert changed the title Problems with modernizr problems with modernizr Nov 21, 2016
@silvenon
Copy link
Member

It sounds like you made some modifications to your setup since you initialized it. Could you provide steps to reproduce this?

@mtompkins
Copy link

If I might share my Modernizr approach after a few days of struggling with it.

Update to a 3.x version with bower
Create a configuration using the online download page: https://modernizr.com/download
Build and download a command line config modernizr-config.json

Add a gulp task, modifying location of modernizr-config.json as necessary:

// Modernizr
var spawn = require('child_process').spawn;
gulp.task('modernizr', function (cb) {
  var cmd = spawn('bower_components/modernizr/bin/modernizr', [
        '-c', 'modernizr-config.json', 
        '-d', 'app/scripts/modernizr-custom.js',
        '-u', '-q'
  ], {stdio: 'inherit'});
  cmd.on('close', function (code) {
      console.log('Modernizr exit code: ' + code);
      cb(code);
  });
});

Change index.html page to reflect changes:

<!-- build:js scripts/vendor/modernizr.js -->
<script type="text/javascript" src='scripts/modernizr-custom.js'></script>
<-- endbuild -->

@silvenon silvenon added the bug label Jan 29, 2017
@UlisesGascon UlisesGascon self-assigned this Oct 28, 2019
@UlisesGascon
Copy link
Member

I assume that this bug was fixed in #737. If not we can re-open it again 😃

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

No branches or pull requests

4 participants