Code Monkey home page Code Monkey logo

browsernizr's Issues

1.1.0 broken

Error: Cannot find module './../../lib/test/css/supports' from '[...]/node_modules/browsernizr/test/css'
   at [...]/node_modules/resolve/lib/async.js:55:21
   at load ([...]/node_modules/resolve/lib/async.js:69:43)
   at onex ([...]/node_modules/resolve/lib/async.js:92:31)
   at [...]/node_modules/resolve/lib/async.js:22:47
   at FSReqWrap.oncomplete (fs.js:95:15)

This is happening on multiple projects of ours. Looks like it was caused by #16 and renders the project completely unusable for us!

Modernizr.addTest: Uncaught TypeError: undefined is not a function

Example:

require('browsernizr/test/forms/validation');
var Modernizr = require('browsernizr');
if (!Modernizr.formvalidation) {
  // do something.
}

Gives the following error:

Uncaught TypeError: undefined is not a function

The line in particular is line 24 in test/forms/validation.js

    Modernizr.addTest('formvalidation', function() {
    }

transforms3d.js require supports causes build failure

In file transforms3d.js line 5 causes a build failure due to a path location issue.

Error: Cannot find module './../../lib/test/css/supports' from 'C:\Users\USERNAME\git\PROJECT\node_modules\browsernizr\test\css'

PROBLEM LINE: 5: require('./../../lib/test/css/supports');

SOLUTION LINE 5: require('./supports');

Regex expression in the build script breaks some scripts.

In certain tests (strictmode.js being an example) parts of the script are being incorrectly deleted because of the regular expression in ./bin/build.

In this particular example, the original code is:

Modernizr.addTest('strictmode', (function(){'use strict'; return !this; })());

And the resulting code is:

  Modernizr.addTest('strictmode', (function(){'use strict'; 

I boiled this down to this:

src = src.replace /(return\s+.*\s*?\}\);\s*?$|\}\);\s*?$)/, ''

https://github.com/jnordberg/browsernizr/blob/master/bin/build#L12

All that being said, I'm not sure what the solution is exactly....

env: coffee: No such file or directory

When running ./bin/build I get:

env: coffee: No such file or directory

Is there another devDependency that I'm missing or isn't included in package.json?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.