srod/node-minify

Basic Crash

Closed this issue · 4 comments

A basic install not loading...

npm install node-minify

a simple script that does nothing but load the module.

    #!/usr/bin/env node
    var compressor = require('node-minify');

yields

    /node_modules/node-minify/node_modules/babel-preset-babili/lib/index.js:36
          throw new Error(`Invalid option "${name}"`);

npm list

├─┬ node-minify@2.1.1
│ ├─┬ babel-core@6.24.1
│ │ ├─┬ babel-code-frame@6.22.0
│ │ │ ├─┬ chalk@1.1.3
│ │ │ │ ├── ansi-styles@2.2.1
│ │ │ │ ├── escape-string-regexp@1.0.5
│ │ │ │ ├─┬ has-ansi@2.0.0
│ │ │ │ │ └── ansi-regex@2.1.1
│ │ │ │ ├─┬ strip-ansi@3.0.1
│ │ │ │ │ └── ansi-regex@2.1.1
│ │ │ │ └── supports-color@2.0.0
│ │ │ ├── esutils@2.0.2
│ │ │ └── js-tokens@3.0.2
│ │ ├─┬ babel-generator@6.25.0
│ │ │ ├─┬ detect-indent@4.0.0
│ │ │ │ └─┬ repeating@2.0.1
│ │ │ │ └─┬ is-finite@1.0.2
│ │ │ │ └── number-is-nan@1.0.1
│ │ │ ├── jsesc@1.3.0
│ │ │ └── trim-right@1.0.1
│ │ ├── babel-helpers@6.24.1
│ │ ├── babel-messages@6.23.0
│ │ ├─┬ babel-register@6.24.1
│ │ │ ├── core-js@2.4.1
│ │ │ ├─┬ home-or-tmp@2.0.0
│ │ │ │ ├── os-homedir@1.0.2
│ │ │ │ └── os-tmpdir@1.0.2
│ │ │ └── source-map-support@0.4.15
│ │ ├─┬ babel-runtime@6.23.0
│ │ │ ├── core-js@2.4.1
│ │ │ └── regenerator-runtime@0.10.5
│ │ ├── babel-template@6.25.0
│ │ ├─┬ babel-traverse@6.25.0
│ │ │ ├── globals@9.18.0
│ │ │ └─┬ invariant@2.2.2
│ │ │ └─┬ loose-envify@1.3.1
│ │ │ └── js-tokens@3.0.2
│ │ ├─┬ babel-types@6.25.0
│ │ │ ├── esutils@2.0.2
│ │ │ └── to-fast-properties@1.0.3
│ │ ├── babylon@6.17.4
│ │ ├── convert-source-map@1.5.0
│ │ ├─┬ debug@2.6.8
│ │ │ └── ms@2.0.0
│ │ ├── json5@0.5.1
│ │ ├── lodash@4.17.4
│ │ ├─┬ minimatch@3.0.4
│ │ │ └─┬ brace-expansion@1.1.8
│ │ │ ├── balanced-match@1.0.0
│ │ │ └── concat-map@0.0.1
│ │ ├── path-is-absolute@1.0.1
│ │ ├── private@0.1.7
│ │ ├── slash@1.0.0
│ │ └── source-map@0.5.6
│ ├─┬ babel-preset-babili@0.1.2
│ │ ├─┬ babel-plugin-minify-builtins@0.1.3
│ │ │ └── babel-helper-evaluate-path@0.1.0
│ │ ├─┬ babel-plugin-minify-constant-folding@0.1.3
│ │ │ └── babel-helper-evaluate-path@0.1.0
│ │ ├─┬ babel-plugin-minify-dead-code-elimination@0.1.7
│ │ │ ├── babel-helper-mark-eval-scopes@0.1.1
│ │ │ ├── babel-helper-remove-or-void@0.1.1
│ │ │ └── lodash.some@4.6.0
│ │ ├─┬ babel-plugin-minify-flip-comparisons@0.1.2
│ │ │ └── babel-helper-is-void-0@0.1.1
│ │ ├─┬ babel-plugin-minify-guarded-expressions@0.1.2
│ │ │ └── babel-helper-flip-expressions@0.1.2
│ │ ├── babel-plugin-minify-infinity@0.1.2
│ │ ├─┬ babel-plugin-minify-mangle-names@0.1.3
│ │ │ └── babel-helper-mark-eval-scopes@0.1.1
│ │ ├── babel-plugin-minify-numeric-literals@0.1.1
│ │ ├── babel-plugin-minify-replace@0.1.2
│ │ ├─┬ babel-plugin-minify-simplify@0.1.2
│ │ │ ├── babel-helper-flip-expressions@0.1.2
│ │ │ ├── babel-helper-is-nodes-equiv@0.0.1
│ │ │ └── babel-helper-to-multiple-sequence-expressions@0.1.1
│ │ ├─┬ babel-plugin-minify-type-constructors@0.1.2
│ │ │ └── babel-helper-is-void-0@0.1.1
│ │ ├── babel-plugin-transform-inline-consecutive-adds@0.1.2
│ │ ├── babel-plugin-transform-member-expression-literals@6.8.4
│ │ ├── babel-plugin-transform-merge-sibling-variables@6.8.5
│ │ ├── babel-plugin-transform-minify-booleans@6.8.2
│ │ ├─┬ babel-plugin-transform-property-literals@6.8.4
│ │ │ └── esutils@2.0.2
│ │ ├── babel-plugin-transform-regexp-constructors@0.1.1
│ │ ├── babel-plugin-transform-remove-console@6.8.4
│ │ ├── babel-plugin-transform-remove-debugger@6.8.4
│ │ ├── babel-plugin-transform-remove-undefined@0.1.2
│ │ ├── babel-plugin-transform-simplify-comparison-operators@6.8.4
│ │ ├── babel-plugin-transform-undefined-to-void@6.8.2
│ │ └── lodash.isplainobject@4.0.6
│ ├─┬ butternut@0.4.6
│ │ ├── acorn@5.1.1
│ │ ├─┬ chalk@1.1.3
│ │ │ ├── ansi-styles@2.2.1
│ │ │ ├── escape-string-regexp@1.0.5
│ │ │ ├─┬ has-ansi@2.0.0
│ │ │ │ └── ansi-regex@2.1.1
│ │ │ ├─┬ strip-ansi@3.0.1
│ │ │ │ └── ansi-regex@2.1.1
│ │ │ └── supports-color@2.0.0
│ │ ├─┬ magic-string@0.20.0
│ │ │ └── vlq@0.2.2
│ │ ├── minimist@1.2.0
│ │ └─┬ sourcemap-codec@1.3.1
│ │ └── vlq@0.2.2
│ ├─┬ clean-css@4.1.3
│ │ └── source-map@0.5.6
│ ├─┬ csso@3.1.1
│ │ └─┬ css-tree@1.0.0-alpha19
│ │ └── source-map@0.5.6
│ ├── depd@1.1.0
│ ├─┬ glob@7.1.2
│ │ ├── fs.realpath@1.0.0
│ │ ├─┬ inflight@1.0.6
│ │ │ └── wrappy@1.0.2
│ │ ├── inherits@2.0.3
│ │ ├─┬ minimatch@3.0.4
│ │ │ └─┬ brace-expansion@1.1.8
│ │ │ ├── balanced-match@1.0.0
│ │ │ └── concat-map@0.0.1
│ │ ├─┬ once@1.4.0
│ │ │ └── wrappy@1.0.2
│ │ └── path-is-absolute@1.0.1
│ ├─┬ google-closure-compiler-js@20170521.0.0
│ │ ├── minimist@1.2.0
│ │ ├─┬ vinyl@2.1.0
│ │ │ ├── clone@2.1.1
│ │ │ ├── clone-buffer@1.0.0
│ │ │ ├── clone-stats@1.0.0
│ │ │ ├─┬ cloneable-readable@1.0.0
│ │ │ │ ├── inherits@2.0.3
│ │ │ │ ├── process-nextick-args@1.0.7
│ │ │ │ └─┬ through2@2.0.3
│ │ │ │ └─┬ readable-stream@2.3.3
│ │ │ │ ├── core-util-is@1.0.2
│ │ │ │ ├── isarray@1.0.0
│ │ │ │ ├── safe-buffer@5.1.1
│ │ │ │ ├── string_decoder@1.0.3
│ │ │ │ └── util-deprecate@1.0.2
│ │ │ ├── remove-trailing-separator@1.0.2
│ │ │ └── replace-ext@1.0.0
│ │ └─┬ webpack-core@0.6.9
│ │ ├── source-list-map@0.1.8
│ │ └─┬ source-map@0.4.4
│ │ └── amdefine@1.0.1
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ ├── node-version@1.0.0
│ ├── sqwish@0.2.2
│ ├─┬ uglify-js@3.0.13
│ │ ├─┬ commander@2.9.0
│ │ │ └── graceful-readlink@1.0.1
│ │ └── source-map@0.5.6
│ └── xtend@4.0.1

srod commented

I can't reproduce, can you provide a small repo ?
Which node version are you using ? What environment ?

Thank you for your quick reply !!

npm -v
2.11.2

node -v
v0.12.5

Debian Linux

uname -a
Linux **** 2.6.32.25-grsec #7 SMP Wed Jan 25 19:45:04 EST 2012 i686 GNU/Linux

I think it may be the node version, let me try to get this updated.......

srod commented

Yes this is because of node 0.12, Babili needs node 4 at minimum.

Sorry, my bad. Thanks !!