Closed siddharthkp closed 7 years ago
Can you tell me the OS and node version?
OS: CentOS 6.4
npm3 version { public: '1.0.0', npm: '3.10.6', ares: '1.9.0-DEV', http_parser: '1.0', modules: '11', node: '0.10.4', openssl: '1.0.1e', uv: '0.10.4', v8: '3.14.5.8', zlib: '1.2.3' }
@pmirandaarias I haven't tested this on CentOS!
Try running du --max-depth 1 -k --exclude ".*" node_modules
this in your directory. This is what I use under the hood. I guess this is not valid syntax for CentOS
Ok. I got a list of node_modules, then I try to run "cost-of-modules" and got the same error.
@pmirandaarias Do you also have the size of the modules? Can you paste the output here?
How can I view that?
Sorry, I meant the output of du --max-depth 1 -k --exclude ".*" node_modules
20 node_modules/babel-preset-stage-0 32 node_modules/fill-range 20 node_modules/babel-plugin-transform-react-jsx 220 node_modules/bn.js 44 node_modules/gemini-scrollbar 20 node_modules/babel-helper-bindify-decorators 76 node_modules/micromatch 16 node_modules/minimalistic-assert 80 node_modules/des.js 1096 node_modules/esprima-fb 144 node_modules/watchify 64 node_modules/typedarray 20 node_modules/has-ansi 20 node_modules/babel-plugin-syntax-export-extensions 268 node_modules/babylon 20 node_modules/to-fast-properties 24 node_modules/babel-helper-function-name 24 node_modules/babel-helper-builder-react-jsx 20 node_modules/find-cache-dir 24 node_modules/glob-parent 2532 node_modules/browserify 20 node_modules/create-ecdh 796 node_modules/source-map 740 node_modules/jstransform 20 node_modules/babel-plugin-syntax-object-rest-spread 20 node_modules/is-equal-shallow 20 node_modules/path-exists 408 node_modules/iconv-lite 40 node_modules/base64-js 20 node_modules/babel-helper-get-function-arity 24 node_modules/center-align 2020 node_modules/webpack 20 node_modules/home-or-tmp 56 node_modules/asap 20 node_modules/ms 20 node_modules/babel-plugin-transform-react-display-name 20 node_modules/longest 36 node_modules/array-reduce 712 node_modules/reactify 36 node_modules/Base64 200 node_modules/through2 24 node_modules/object.omit 176 node_modules/babel-types 568 node_modules/syntax-error 20 node_modules/arr-flatten 116 node_modules/browser-pack 20 node_modules/right-align 120 node_modules/react-dropzone 20 node_modules/for-in 64 node_modules/outpipe 28 node_modules/babel-plugin-transform-class-properties 168 node_modules/enhanced-resolve 600 node_modules/uglify-js 96 node_modules/async 32 node_modules/has 92 node_modules/browserify-aes 20 node_modules/repeating 200 node_modules/insert-module-globals 40 node_modules/astw 48 node_modules/graceful-fs 20 node_modules/duplexer2 20 node_modules/query-string 88 node_modules/babel-plugin-syntax-trailing-function-commas 5200 node_modules/flux 20 node_modules/ansi-styles 20 node_modules/babel-plugin-transform-async-to-generator 20 node_modules/babel-plugin-syntax-flow 20 node_modules/path-is-absolute 48 node_modules/browserify-sign 20 node_modules/babel-plugin-syntax-do-expressions 36 node_modules/miller-rabin 56 node_modules/emojis-list 68 node_modules/glob 20 node_modules/object-assign 20 node_modules/inflight 28 node_modules/constants-browserify 792 node_modules/react-router 704 node_modules/react 24 node_modules/process-nextick-args 24 node_modules/regex-cache 20 node_modules/is-stream 40 node_modules/errno 40 node_modules/diffie-hellman 24 node_modules/interpret 24 node_modules/browserify-cipher 20 node_modules/anymatch 36 node_modules/array-map 28 node_modules/pbkdf2 428 node_modules/react-infinite 20 node_modules/is-dotfile 24 node_modules/lodash.isarray 24 node_modules/glob-base 176 node_modules/react-maskedinput 20 node_modules/for-own 52 node_modules/attr-accept 20 node_modules/parse-glob 88 node_modules/jsonparse 4064 node_modules/react-tools 36 node_modules/base62 212 node_modules/source-list-map 24 node_modules/browserify-des 40 node_modules/react-gemini-scrollbar 36 node_modules/babel-plugin-transform-runtime 132 node_modules/yargs 40 node_modules/jsesc 44 node_modules/core-util-is 32 node_modules/private 20 node_modules/decamelize 60 node_modules/big.js 28 node_modules/stream-browserify 20 node_modules/is-glob 4996 node_modules/lodash 132 node_modules/node-fetch 20 node_modules/babel-plugin-transform-function-bind 20 node_modules/babel-plugin-syntax-class-constructor-call 72 node_modules/minimist 28 node_modules/util-deprecate 24 node_modules/randomatic 112 node_modules/commoner 20 node_modules/babel-plugin-syntax-function-bind 72 node_modules/deps-sort 68 node_modules/wordwrap 76 node_modules/sha.js 24 node_modules/babel-messages 20 node_modules/babel-plugin-syntax-class-properties 24 node_modules/babel-helper-define-map 28 node_modules/babel-helper-remap-async-to-generator 20 node_modules/cipher-base 40 node_modules/assert 52 node_modules/globals 28 node_modules/braces 36 node_modules/amdefine 20 node_modules/babel-plugin-syntax-jsx 24 node_modules/browser-resolve 548 node_modules/dropzone 40 node_modules/function-bind 64 node_modules/babel-loader 212 node_modules/ast-types 20 node_modules/babel-plugin-syntax-decorators 20 node_modules/babel-plugin-transform-async-generator-functions 140 node_modules/q 24 node_modules/os-browserify 188 node_modules/stream-http 52 node_modules/fbemitter 24 node_modules/align-text 384 node_modules/buffer 116 node_modules/http-browserify 52 node_modules/querystring-es3 5472 node_modules/fbjs 28 node_modules/builtin-status-codes 20 node_modules/is-primitive 2516 node_modules/react-dom 28 node_modules/stream-combiner2 72 node_modules/hash.js 20 node_modules/strict-uri-encode 20 node_modules/babel-helper-explode-assignable-expression 20 node_modules/escape-string-regexp 828 node_modules/detective 20 node_modules/babel-plugin-transform-export-extensions 20 node_modules/isobject 20 node_modules/is-extglob 524 node_modules/JSONStream 224 node_modules/ion-rangeslider 3360 node_modules/node-libs-browser 36 node_modules/process 24 node_modules/repeat-string 48 node_modules/minimatch 20 node_modules/is-binary-path 36 node_modules/domain-browser 40 node_modules/defined 24 node_modules/expand-range 20 node_modules/babel-plugin-transform-class-constructor-call 20 node_modules/arr-diff 112 node_modules/crypto-browserify 20 node_modules/has-flag 20 node_modules/normalize-path 28 node_modules/is-buffer 20 node_modules/babel-template 32 node_modules/xtend 140 node_modules/subarg 204 node_modules/promise 20 node_modules/babel-plugin-syntax-async-generators 80 node_modules/convert-source-map 20 node_modules/window-size 20 node_modules/supports-color 300 node_modules/webpack-core 32 node_modules/invariant 28 node_modules/js-tokens 20 node_modules/babel-preset-react 24 node_modules/lodash.memoize 156 node_modules/optimist 152 node_modules/combine-source-map 36 node_modules/create-hash 40 node_modules/buffer-xor 20 node_modules/brace-expansion 52 node_modules/querystring 480 node_modules/immutable 16 node_modules/slash 36 node_modules/punycode 24 node_modules/randombytes 20 node_modules/camelcase 40 node_modules/cliui 28 node_modules/babel-plugin-transform-object-rest-spread 212 node_modules/ua-parser-js 32 node_modules/browserify-rsa 28 node_modules/ripemd160 20 node_modules/binary-extensions 28 node_modules/warning 132 node_modules/url 104 node_modules/mkdirp 20 node_modules/babel-preset-stage-3 44 node_modules/clone 28 node_modules/ieee754 20 node_modules/arrify 24 node_modules/pinkie 24 node_modules/create-hmac 424 node_modules/griddle-react 460 node_modules/babel-polyfill 36 node_modules/path-platform 24 node_modules/brorand 1104 node_modules/react-dropzone-component 20 node_modules/is-extendable 40 node_modules/console-browserify 100 node_modules/events 148 node_modules/babel-generator 20 node_modules/lazy-cache 212 node_modules/browserify-zlib 64 node_modules/json5 20 node_modules/evp_bytestokey 24 node_modules/htmlescape 36 node_modules/pbkdf2-compat 240 node_modules/babel-traverse 48 node_modules/inputmask-core 28 node_modules/array-filter 184 node_modules/babel-core 464 node_modules/resolve 20 node_modules/pinkie-promise 24 node_modules/prr 460 node_modules/history 16 node_modules/set-immediate-shim 40 node_modules/babel-helpers 40 node_modules/isomorphic-fetch 20 node_modules/babel-helper-explode-class 76 node_modules/shell-quote 24 node_modules/preserve 196 node_modules/concat-stream 44 node_modules/regenerator-runtime 36 node_modules/encoding 20 node_modules/balanced-match 56 node_modules/inline-source-map 20 node_modules/buffer-shims 20 node_modules/babel-plugin-transform-flow-strip-types 20 node_modules/os-tmpdir 24 node_modules/umd 24 node_modules/path-browserify 24 node_modules/inherits 48 node_modules/deep-equal 20 node_modules/babel-plugin-transform-exponentiation-operator 20 node_modules/async-each 20 node_modules/detect-indent 796 node_modules/pako 24 node_modules/to-arraybuffer 56 node_modules/memory-fs 20 node_modules/babel-plugin-syntax-dynamic-import 40 node_modules/whatwg-fetch 112 node_modules/readdirp 36 node_modules/cached-path-relative 20 node_modules/wrappy 7012 node_modules/core-js 44 node_modules/parents 20 node_modules/extglob 24 node_modules/kind-of 20 node_modules/babel-helper-builder-binary-assignment-operator-visitor 56 node_modules/json-stable-stringify 24 node_modules/indexof 40 node_modules/date-now 20 node_modules/babel-plugin-syntax-async-functions 24 node_modules/loader-utils 20 node_modules/strip-ansi 120 node_modules/asn1.js 112 node_modules/source-map-support 24 node_modules/chalk 124 node_modules/readable-stream 252 node_modules/lexical-scope 36 node_modules/loose-envify 20 node_modules/babel-code-frame 20 node_modules/babel-preset-es2016 596 node_modules/acorn 20 node_modules/graceful-readlink 536 node_modules/recast 64 node_modules/vm-browserify 20 node_modules/is-finite 24 node_modules/cookie 40 node_modules/react-cookie 72 node_modules/esutils 20 node_modules/find-up 20 node_modules/babel-plugin-transform-react-jsx-self 28 node_modules/isarray 48 node_modules/read-only-stream 20 node_modules/https-browserify 36 node_modules/commondir 68 node_modules/debug 108 node_modules/labeled-stream-splicer 20 node_modules/array-unique 204 node_modules/watchpack 20 node_modules/babel-preset-stage-2 20 node_modules/hoist-non-react-statics 36 node_modules/concat-map 48 node_modules/jsonify 20 node_modules/pkg-dir 20 node_modules/is-number 1660 node_modules/jquery 20 node_modules/once 20 node_modules/lodash.isfinite 20 node_modules/os-homedir 64 node_modules/timers-browserify 20 node_modules/ansi-regex 20 node_modules/number-is-nan 120 node_modules/util 32 node_modules/shasum 32 node_modules/envify 32 node_modules/babel-register 24 node_modules/babel-plugin-transform-decorators 128 node_modules/public-encrypt 48 node_modules/through 20 node_modules/is-posix-bracket 140 node_modules/parse-asn1 1020 node_modules/babel-runtime 28 node_modules/uglify-to-browserify 180 node_modules/elliptic 24 node_modules/string_decoder 20 node_modules/expand-brackets 60 node_modules/commander 20 node_modules/babel-plugin-syntax-exponentiation-operator 648 node_modules/module-deps 20 node_modules/babel-plugin-transform-do-expressions 16 node_modules/filename-regex 36 node_modules/tapable 16 node_modules/keymirror 92 node_modules/stream-splicer 20 node_modules/tty-browserify 20 node_modules/repeat-element 20 node_modules/babel-preset-stage-1 20 node_modules/babel-plugin-transform-react-jsx-source 100 node_modules/chokidar 70848 node_modules
This is the perfect result.
If you're up for pair debugging π , next step in debugging - Clone the repo, run npm install
and npm test
.
Ah, let's see
I got this error: echo 'Error: no test specified'
By the way, this is my package.json:
{ "name": "public", "version": "1.0.0", "description": "", "main": "boot.js", "scripts": { "start": "webpack", "build": "webpack -p --config webpack-production.config.js", "dev": "webpack " }, "author": "XXX", "license": "ISC", "devDependencies": { "babel-plugin-transform-runtime": "^6.15.0", "babel-preset-stage-0": "^6.16.0", "babel-preset-stage-1": "^6.16.0", "babel-preset-stage-2": "^6.18.0", "babel-preset-stage-3": "^6.17.0", "webpack": "^1.13.3" }, "dependencies": { "babel-core": "^6.18.2", "babel-loader": "^6.2.8", "babel-polyfill": "^6.16.0", "babel-preset-es2016": "^6.16.0", "babel-preset-react": "^6.16.0", "babel-runtime": "^6.18.0", "browserify": "^13.1.1", "envify": "^3.4.1", "fbjs": "^0.8.6", "flux": "^2.1.1", "griddle-react": "^0.7.0", "ion-rangeslider": "^2.1.4", "keymirror": "^0.1.1", "object-assign": "^4.1.0", "react": "^15.4.1", "react-cookie": "^0.4.7", "react-dom": "^15.4.1", "react-dropzone": "^3.7.3", "react-dropzone-component": "^1.2.0", "react-gemini-scrollbar": "^2.1.5", "react-maskedinput": "^3.3.1", "react-router": "^2.8.1", "reactify": "^1.1.1", "uglify-js": "^2.7.4", "watchify": "^3.7.0" }, "browserify": { "transform": [ "reactify", "envify" ] } }
@pmirandaarias Can you update to 0.4.2 and verify?
Ok, I'll check.
The only difference now was that it took like 10 seconds on "Calculating..." before the error. With the previous version the error was almost inmediately.
[root@XXX public]# npm install -g cost-of-modules /usr/local/bin/cost-of-modules -> /usr/local/lib/node_modules/cost-of-modules/lib/index.js /usr/local/lib βββ cost-of-modules@0.4.2
[root@XXX public]# cost-of-module -bash: cost-of-module: no se encontrΓ³ la orden [root@XXX public]# cost-of-modules
Making sure dependendies are installed npm install --production
Calculating...
/usr/local/lib/node_modules/cost-of-modules/lib/helpers.js:214
throw _iteratorError2;
^
ReferenceError: Symbol is not defined
at Object.attachNestedDependencies (/usr/local/lib/node_modules/cost-of-modules/lib/helpers.js:195:48)
at Object.
Cool, thanks.
You might have to wait some more π
@siddharthkp after some research, I found why
From : https://babeljs.io/docs/usage/caveatsy
The solution would be to either add a polyfill, or change every for...of
to a normal for
loop. I lean to changing loops, why add another module? What do you think? I can change the loops if you agree.
@alshakero good find! Completely agree.
I've sent a PR. Could you check with Travis?
@pmirandaarias, @alshakero's PR is published!
Upgrade to 0.5.1?
I guess it would be better if @pmirandaarias could please clone and try before that? It's 2 appreciated mins
git clone https://github.com/siddharthkp/cost-of-modules.git
cd cost-of-modules
npm install
npm test
And share the results π
Ok guys, give me some minutes (maybe an hour), kinda busy here with some ReactJS stuff D:
Just upgraded to 0.5.1 and... VoilΓ !
[root@XXX public]# cost-of-modules
Making sure dependendies are installed npm install --production
Calculating...
ββββββββββββββββββββββββββββ¬βββββββββββββββ¬βββββββββ β name β children β size β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β browserify β 118 β 6.71M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β reactify β 5 β 5.69M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β flux β 5 β 5.33M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β fbjs β 10 β 3.82M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β envify β 16 β 3.47M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β babel-core β 42 β 3.25M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β babel-polyfill β 2 β 2.30M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β react-dom β 0 β 2.03M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β react-dropzone-component β 1 β 1.75M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β ion-rangeslider β 1 β 1.35M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β uglify-js β 14 β 0.82M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β react-router β 8 β 0.82M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β react β 0 β 0.52M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β watchify β 41 β 0.49M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β griddle-react β 0 β 0.36M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β babel-loader β 12 β 0.21M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β react-maskedinput β 1 β 0.16M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β react-dropzone β 1 β 0.10M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β babel-preset-react β 8 β 0.04M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β babel-runtime β 0 β 0.04M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β react-gemini-scrollbar β 1 β 0.04M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β react-cookie β 1 β 0.03M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β babel-preset-es2016 β 4 β 0.02M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β object-assign β 0 β 0.01M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β keymirror β 0 β 0.00M β ββββββββββββββββββββββββββββΌβββββββββββββββΌβββββββββ€ β 25 modules β 271 children β 29.90M β
Well so, according to my results, any comment about my modules? :)
:tada: it works!
@pmirandaarias Thanks for being so patient.
You seem to have some build stuff as dependencies
instead of devDependencies
(browserify, babel, watchify, etc)
Ok, no problem, trying to contribute to the community, that's all.
@siddharthkp should we close this?
@alshakero Forgot to close the issue π
from https://twitter.com/PmaContacto/status/804703698257608704