Giter Site home page Giter Site logo

stats's Issues

npm version crashes

Installed module from npm and it crashes regardless of what opts I try.

Install:

$ npm install -g stats

Run:

$ stats --totals dirName

/usr/local/lib/node_modules/stats/lib/parser.js:249
if (!options.ignoreParseErrors) throw err;  
                                      ^
SyntaxError: Unexpected token name, expected punc on line 104:22:
    '  for (routeContainer of routes) {'
    at Object.module.exports [as parse] (/usr/local/lib/node_modules/stats/lib/parser.js:244:11)

Versions:

$ npm -v
2.11.1

$ node -v  /  iojs -v
v2.3.0

OS:

Mac OS X 10.10.1

Parse errors don't show file/line

Hi,

thanks for this module! It's working great for some of my code, but when running it over all of transloadit, I get a crash like this:

/usr/local/lib/node_modules/stats/node_modules/uglify-js/lib/parse-js.js:272
        throw new JS_Parse_Error(message, line, col, pos);
              ^
TypeError: object is not a function
    at Object.CALL_NON_FUNCTION (native)
    at new JS_Parse_Error (/usr/local/lib/node_modules/stats/node_modules/uglify-js/lib/parse-js.js:261:20)
    at js_error (/usr/local/lib/node_modules/stats/node_modules/uglify-js/lib/parse-js.js:272:15)
    at croak (/usr/local/lib/node_modules/stats/node_modules/uglify-js/lib/parse-js.js:720:17)
    at token_error (/usr/local/lib/node_modules/stats/node_modules/uglify-js/lib/parse-js.js:727:17)
    at unexpected (/usr/local/lib/node_modules/stats/node_modules/uglify-js/lib/parse-js.js:733:17)
    at Object.semicolon [as 1] (/usr/local/lib/node_modules/stats/node_modules/uglify-js/lib/parse-js.js:753:51)
    at prog1 (/usr/local/lib/node_modules/stats/node_modules/uglify-js/lib/parse-js.js:1291:28)
    at /usr/local/lib/node_modules/stats/node_modules/uglify-js/lib/parse-js.js:860:40
    at block_ (/usr/local/lib/node_modules/stats/node_modules/

Due to the lack of file / line number info, I can't really provide more info.

ES6 support

SyntaxError: Unexpected token: name (React) on line 0:7:
    'import React from \'react\';'

Add ability to get stats from a single file

stats lib/parser.js

/home/criso/local/lib/node_modules/stats/bin/stats:97
var pending = files.length;
^
TypeError: Cannot read property 'length' of undefined
at /home/criso/local/lib/node_modules/stats/bin/stats:97:22
at /home/criso/local/lib/node_modules/stats/lib/find.js:34:9

Too many open files

Hey,

I get an EMFILE, Too many open files error when using stats in a large project. Maybe you should also exclude node_modules directories and git submodules directly.

And shouldn't it show the help information if no path is given?

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.