segmentio / myth

A CSS preprocessor that acts like a polyfill for future versions of the spec.
4.32k stars 131 forks source link

Cannot build standalone browser version anymore #76

Closed MoOx closed 10 years ago

MoOx commented 10 years ago

Hey @ianstormtaylor it seems with some node or browserify update we cannot make a working standalone myth.js anymore. I just run make myth.js & try to run test (I've resolved #69) but got an error that seems related to node stuff (process.version is unknown). Btw, I saw a lot of changes in that file. Not sure why. Any clues about that ?

~/Sync/Development/myth/myth master  
❯ npm i              
is-browser@2.0.0 node_modules/is-browser

node-watch@0.3.4 node_modules/node-watch

pad-component@0.0.1 node_modules/pad-component

write-file-stdout@0.0.2 node_modules/write-file-stdout

rework-rebeccapurple@1.0.1 node_modules/rework-rebeccapurple

commander@2.1.0 node_modules/commander

rework-font-variant@0.0.3 node_modules/rework-font-variant

colors@0.6.2 node_modules/colors

rework-calc@0.2.2 node_modules/rework-calc

read-file-stdin@0.0.4 node_modules/read-file-stdin
└── stream-to-array@1.0.0

rework-hex-alpha@1.0.0 node_modules/rework-hex-alpha
└── rgb@0.0.1

rework-vars@3.1.1 node_modules/rework-vars
├── rework-visit@1.0.0
└── balanced-match@0.1.0

mocha@1.15.1 node_modules/mocha
├── diff@1.0.7
├── growl@1.7.0
├── commander@2.0.0
├── mkdirp@0.3.5
├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
├── debug@1.0.2 (ms@0.6.2)
└── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)

rework-color-function@1.0.0 node_modules/rework-color-function
├── balanced-match@0.0.0
└── css-color-function@0.1.0 (rgb@0.0.1, debug@0.7.4, color@0.5.0)

rework@1.0.0 node_modules/rework
├── convert-source-map@0.3.4
├── mime@1.2.11
├── debug@1.0.2 (ms@0.6.2)
└── css@2.0.0 (urix@0.1.0, source-map-resolve@0.1.4, source-map@0.1.34)

autoprefixer@0.8.20131213 node_modules/autoprefixer
├── css-parse@1.6.0
└── css-stringify@1.4.1 (source-map@0.1.34)

rework-import@1.0.0 node_modules/rework-import
├── parse-import@0.1.3
├── find-file@0.1.4
├── graceful-fs@2.0.3
└── css@1.6.0 (css-parse@1.7.0, css-stringify@1.4.1)

browserify@3.46.1 node_modules/browserify
├── builtins@0.0.4
├── https-browserify@0.0.0
├── tty-browserify@0.0.0
├── constants-browserify@0.0.1
├── process@0.7.0
├── path-browserify@0.0.0
├── os-browserify@0.1.2
├── inherits@2.0.1
├── commondir@0.0.1
├── domain-browser@1.1.2
├── defined@0.0.0
├── stream-combiner@0.0.4
├── duplexer@0.1.1
├── shell-quote@0.0.1
├── deep-equal@0.1.2
├── shallow-copy@0.0.1
├── xtend@3.0.0
├── parents@0.0.2
├── console-browserify@1.0.3
├── querystring-es3@0.2.0
├── punycode@1.2.4
├── string_decoder@0.0.1
├── url@0.10.1
├── util@0.10.3
├── events@1.0.1
├── timers-browserify@1.0.1 (process@0.5.2)
├── stream-browserify@0.1.3 (process@0.5.2)
├── vm-browserify@0.0.4 (indexof@0.0.1)
├── assert@1.1.1 (util@0.10.2)
├── resolve@0.6.3
├── browser-resolve@1.2.4
├── subarg@0.0.1 (minimist@0.0.10)
├── glob@3.2.11 (minimatch@0.3.0)
├── through2@0.4.2 (xtend@2.1.2, readable-stream@1.0.27-1)
├── concat-stream@1.4.6 (typedarray@0.0.6, readable-stream@1.1.13-1)
├── JSONStream@0.7.4 (through@2.3.4, jsonparse@0.0.5)
├── deps-sort@0.1.2 (through@2.3.4, minimist@0.0.10, JSONStream@0.6.4)
├── crypto-browserify@1.0.9
├── http-browserify@1.3.2 (Base64@0.2.1)
├── syntax-error@1.1.0 (esprima-fb@3001.1.0-dev-harmony-fb)
├── browserify-zlib@0.1.4 (pako@0.2.3)
├── umd@2.0.0 (through@2.3.4, rfile@1.0.0, ruglify@1.0.0, uglify-js@2.4.14)
├── browser-pack@2.0.1 (through@2.3.4, JSONStream@0.6.4, combine-source-map@0.3.0)
├── derequire@0.8.0 (estraverse@1.5.0, esrefactor@0.1.0, esprima-fb@3001.1.0-dev-harmony-fb)
├── buffer@2.1.13 (ieee754@1.1.3, base64-js@0.0.7)
├── module-deps@2.0.6 (minimist@0.0.10, stream-combiner@0.1.0, readable-stream@1.0.27-1, duplexer2@0.0.2, detective@3.1.0)
└── insert-module-globals@6.0.0 (process@0.6.0, through@2.3.4, lexical-scope@1.1.0)

~/Sync/Development/myth/myth master  14s
❯ make myth.js       

~/Sync/Development/myth/myth master*  11s
❯ npm test           

> myth@1.0.4 test /Users/MoOx/Sync/Development/myth/myth
> make test

/Users/MoOx/Sync/Development/myth/myth/myth.js:12550
    process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
                    ^
TypeError: Cannot call method 'match' of undefined
    at Object.<anonymous> (/Users/MoOx/Sync/Development/myth/myth/myth.js:12550:21)
    at Object.FWaASH (/Users/MoOx/Sync/Development/myth/myth/myth.js:12758:4)
    at s (/Users/MoOx/Sync/Development/myth/myth/myth.js:1:573)
    at /Users/MoOx/Sync/Development/myth/myth/myth.js:1:624
    at Object.<anonymous> (/Users/MoOx/Sync/Development/myth/myth/myth.js:12372:1)
    at Object../polyfills.js (/Users/MoOx/Sync/Development/myth/myth/myth.js:12526:4)
    at s (/Users/MoOx/Sync/Development/myth/myth/myth.js:1:573)
    at /Users/MoOx/Sync/Development/myth/myth/myth.js:1:624
    at Object.<anonymous> (/Users/MoOx/Sync/Development/myth/myth/myth.js:11334:10)
    at Object.FWaASH (/Users/MoOx/Sync/Development/myth/myth/myth.js:11476:4)
    at s (/Users/MoOx/Sync/Development/myth/myth/myth.js:1:573)
    at /Users/MoOx/Sync/Development/myth/myth/myth.js:1:624
    at Object.autoprefixer (/Users/MoOx/Sync/Development/myth/myth/myth.js:8:16)
    at s (/Users/MoOx/Sync/Development/myth/myth/myth.js:1:573)
    at e (/Users/MoOx/Sync/Development/myth/myth/myth.js:1:744)
    at /Users/MoOx/Sync/Development/myth/myth/myth.js:1:762
    at a (/Users/MoOx/Sync/Development/myth/myth/myth.js:1:119)
    at Object.<anonymous> (/Users/MoOx/Sync/Development/myth/myth/myth.js:1:309)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/MoOx/Sync/Development/myth/myth/test/index.js:8:15)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /Users/MoOx/Sync/Development/myth/myth/node_modules/mocha/lib/mocha.js:157:27
    at Array.forEach (native)
    at Mocha.loadFiles (/Users/MoOx/Sync/Development/myth/myth/node_modules/mocha/lib/mocha.js:154:14)
    at Mocha.run (/Users/MoOx/Sync/Development/myth/myth/node_modules/mocha/lib/mocha.js:341:31)
    at Object.<anonymous> (/Users/MoOx/Sync/Development/myth/myth/node_modules/mocha/bin/_mocha:351:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
make: *** [test] Error 8
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0
``
ianstormtaylor commented 10 years ago

Hmm not sure :/ I remember having some weird browserify issues at one point, but not what they were about. Seemed finicky, but if we can get it working with the latest version that would be ideal

MoOx commented 10 years ago

It seems to me broken since the switch from rework-inline to rework-import (which is a bit weird since this change is related to a merge of rework-inline to rework-import). I hope I'll found what is the f***.

MoOx commented 10 years ago

It was related to a use of graceful-fs module in rework-import. Sorry for that, fixed.

ianstormtaylor commented 10 years ago

boom nice find!

On Wed, Jun 25, 2014 at 11:54 PM, Maxime Thirouin notifications@github.com wrote:

It was related to a use of graceful-fs module in rework-import. Sorry for that, fixed.

— Reply to this email directly or view it on GitHub https://github.com/segmentio/myth/issues/76#issuecomment-47193314.