ReactTraining/react-stdio

Do not work on windows

vicentedealencar opened this issue · 5 comments

Hi,

when I do npm install react-stdio this is the output:

npm WARN prefer global react-stdio@2.0.7 should be installed with -g
amdefine@1.0.0 node_modules\react-hot-loader\node_modules\react\node_modules\envify\node_modules\jstransform\node_modules\source-map\node_modules\amdefine -> node_modules\amdefine
ansi-regex@2.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\chalk\node_modules\has-ansi\node_modules\ansi-regex -> node_modules\ansi-regex
ansi-styles@2.1.0 node_modules\gulp\node_modules\gulp-cli\node_modules\chalk\node_modules\ansi-styles -> node_modules\ansi-styles
archy@1.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\archy -> node_modules\archy
base62@0.1.1 node_modules\react-hot-loader\node_modules\react\node_modules\envify\node_modules\jstransform\node_modules\base62 -> node_modules\base62
concat-map@0.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob\node_modules\minimatch\node_modules\brace-expansion\node_modules\concat-map -> node_modules\concat-map
extend@2.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\extend -> node_modules\extend
flagged-respawn@0.3.1 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\flagged-respawn -> node_modules\flagged-respawn
get-stdin@4.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat\node_modules\get-stdin -> node_modules\get-stdin
lodash@2.4.2 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\findup-sync\node_modules\lodash -> node_modules\globule\node_modules\lodash
- escape-string-regexp@1.0.3 node_modules\gulp\node_modules\gulp-cli\node_modules\chalk\node_modules\escape-string-regexp
- chalk@1.1.0 node_modules\gulp\node_modules\gulp-cli\node_modules\chalk
- ansi-regex@2.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\chalk\node_modules\strip-ansi\node_modules\ansi-regex
- array-differ@1.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\array-differ
- array-uniq@1.0.2 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\array-uniq
- beeper@1.1.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\beeper
- camelcase@1.2.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\camelcase-keys\node_modules\camelcase
- camelcase-keys@1.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\camelcase-keys
- lodash._reescape@3.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash._reescape
- lodash._reevaluate@3.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash._reevaluate
- lodash._reinterpolate@3.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash._reinterpolate
- lodash._basecopy@3.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash._basecopy
- lodash._basetostring@3.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash._basetostring
- lodash._basevalues@3.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash._basevalues
- lodash._isiterateecall@3.0.9 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash._isiterateecall
- lodash.escape@3.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash.escape
- lodash._getnative@3.9.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash.keys\node_modules\lodash._getnative
- lodash.isarguments@3.0.4 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash.keys\node_modules\lodash.isarguments
- lodash.isarray@3.0.4 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash.keys\node_modules\lodash.isarray
- lodash.keys@3.1.2 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash.keys
- lodash.restparam@3.6.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash.restparam
- lodash.templatesettings@3.1.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template\node_modules\lodash.templatesettings
- lodash.template@3.6.2 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\lodash.template
- minimist@1.1.3 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\minimist
- indent-string@1.2.2 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\indent-string
- core-util-is@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\multipipe\node_modules\duplexer2\node_modules\readable-stream\node_modules\core-util-is
- inherits@2.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\multipipe\node_modules\duplexer2\node_modules\readable-stream\node_modules\inherits
- isarray@0.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\multipipe\node_modules\duplexer2\node_modules\readable-stream\node_modules\isarray
- string_decoder@0.10.31 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\multipipe\node_modules\duplexer2\node_modules\readable-stream\node_modules\string_decoder
- readable-stream@1.1.13 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\multipipe\node_modules\duplexer2\node_modules\readable-stream
- duplexer2@0.0.2 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\multipipe\node_modules\duplexer2
- multipipe@0.1.2 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\multipipe
- object-assign@3.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\object-assign
- meow@3.3.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat\node_modules\meow
- dateformat@1.0.11 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat
- replace-ext@0.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\replace-ext
- core-util-is@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\through2\node_modules\readable-stream\node_modules\core-util-is
- isarray@0.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\through2\node_modules\readable-stream\node_modules\isarray
- process-nextick-args@1.0.2 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\through2\node_modules\readable-stream\node_modules\process-nextick-args
- string_decoder@0.10.31 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\through2\node_modules\readable-stream\node_modules\string_decoder
- util-deprecate@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\through2\node_modules\readable-stream\node_modules\util-deprecate
- readable-stream@2.0.2 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\through2\node_modules\readable-stream
- xtend@4.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\through2\node_modules\xtend
- through2@2.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\through2
- clone@1.0.2 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\vinyl\node_modules\clone
- clone-stats@0.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\vinyl\node_modules\clone-stats
- vinyl@0.5.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\vinyl
- gulp-util@3.0.6 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util
- interpret@0.6.5 node_modules\gulp\node_modules\gulp-cli\node_modules\interpret
- inherits@2.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob\node_modules\inherits
- balanced-match@0.2.0 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob\node_modules\minimatch\node_modules\brace-expansion\node_modules\balanced-match
- brace-expansion@1.1.0 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob\node_modules\minimatch\node_modules\brace-expansion
- wrappy@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob\node_modules\once\node_modules\wrappy
- once@1.3.2 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob\node_modules\once
- glob@4.3.5 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob
- findup-sync@0.2.1 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync
- liftoff@2.1.0 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff
- findup-sync@0.1.3 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\findup-sync
- inherits@2.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\findup-sync\node_modules\glob\node_modules\inherits
- lru-cache@2.6.5 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\findup-sync\node_modules\glob\node_modules\minimatch\node_modules\lru-cache
- sigmund@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\findup-sync\node_modules\glob\node_modules\minimatch\node_modules\sigmund
- graceful-fs@1.2.3 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\globule\node_modules\glob\node_modules\graceful-fs
- inherits@1.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\globule\node_modules\glob\node_modules\inherits
- glob@3.1.21 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\globule\node_modules\glob
- lodash@1.0.2 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\globule\node_modules\lodash
- globule@0.1.0 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\globule
- lru-cache@2.6.5 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\globule\node_modules\minimatch\node_modules\lru-cache
- resolve@0.5.1 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\resolve
- stack-trace@0.0.7 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\stack-trace
- matchdep@0.3.0 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep
- pretty-hrtime@1.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\pretty-hrtime
- tildify@1.1.0 node_modules\gulp\node_modules\gulp-cli\node_modules\tildify
- v8flags@2.0.10 node_modules\gulp\node_modules\gulp-cli\node_modules\v8flags
- hoek@2.14.0 node_modules\gulp\node_modules\gulp-cli\node_modules\wreck\node_modules\hoek
- boom@2.8.0 node_modules\gulp\node_modules\gulp-cli\node_modules\wreck\node_modules\boom
- wreck@5.6.1 node_modules\gulp\node_modules\gulp-cli\node_modules\wreck
- yargs@1.3.3 node_modules\gulp\node_modules\gulp-cli\node_modules\yargs
has-ansi@2.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\chalk\node_modules\has-ansi -> node_modules\has-ansi
inherits@2.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\through2\node_modules\readable-stream\node_modules\inherits -> node_modules\inherits
esprima-fb@13001.1001.0-dev-harmony-fb node_modules\react-hot-loader\node_modules\react\node_modules\envify\node_modules\jstransform\node_modules\esprima-fb ->
node_modules\jstransform\node_modules\esprima-fb
source-map@0.1.31 node_modules\react-hot-loader\node_modules\react\node_modules\envify\node_modules\jstransform\node_modules\source-map -> node_modules\jstransform\node_modules\source-map
jstransform@10.1.0 node_modules\react-hot-loader\node_modules\react\node_modules\envify\node_modules\jstransform -> node_modules\jstransform
map-obj@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\camelcase-keys\node_modules\map-obj -> node_modules\map-obj
minimatch@2.0.10 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob\node_modules\minimatch -> node_modules\minimatch
number-is-nan@1.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\indent-string\node_modules\repeating\node_modules\is-finite\node_modules\number-is-nan -> node_modules\number-is-nan
is-finite@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\indent-string\node_modules\repeating\node_modules\is-finite -> node_modules\is-finite
os-homedir@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\tildify\node_modules\os-homedir -> node_modules\os-homedir
repeating@1.1.3 node_modules\gulp\node_modules\gulp-cli\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\indent-string\node_modules\repeating -> node_modules\repeating
resolve@1.1.6 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\resolve -> node_modules\resolve
rechoir@0.6.2 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\rechoir -> node_modules\rechoir
semver@4.3.6 node_modules\gulp\node_modules\gulp-cli\node_modules\semver-greatest-satisfied-range\node_modules\semver -> node_modules\semver-greatest-satisfied-range\node_modules\semver
semver-regex@1.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\semver-greatest-satisfied-range\node_modules\semver-regex -> node_modules\semver-regex
semver-greatest-satisfied-range@1.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\semver-greatest-satisfied-range -> node_modules\semver-greatest-satisfied-range
sigmund@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\globule\node_modules\minimatch\node_modules\sigmund -> node_modules\sigmund
minimatch@0.2.14 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\globule\node_modules\minimatch -> node_modules\globule\node_modules\minimatch
minimatch@0.3.0 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\findup-sync\node_modules\glob\node_modules\minimatch -> node_modules\globule\node_modules\glob\node_modules\minimatch
glob@3.2.11 node_modules\gulp\node_modules\gulp-cli\node_modules\matchdep\node_modules\findup-sync\node_modules\glob -> node_modules\globule\node_modules\glob
strip-ansi@3.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\chalk\node_modules\strip-ansi -> node_modules\strip-ansi
supports-color@2.0.0 node_modules\gulp\node_modules\gulp-cli\node_modules\chalk\node_modules\supports-color -> node_modules\supports-color
through@2.3.8 node_modules\react-hot-loader\node_modules\react\node_modules\envify\node_modules\through -> node_modules\through
envify@3.4.0 node_modules\react-hot-loader\node_modules\react\node_modules\envify -> node_modules\envify
user-home@1.1.1 node_modules\gulp\node_modules\gulp-cli\node_modules\v8flags\node_modules\user-home -> node_modules\user-home
wrappy@1.0.1 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob\node_modules\inflight\node_modules\wrappy -> node_modules\wrappy
inflight@1.0.4 node_modules\gulp\node_modules\gulp-cli\node_modules\liftoff\node_modules\findup-sync\node_modules\glob\node_modules\inflight -> node_modules\inflight
- react@0.13.3 node_modules\react-hot-loader\node_modules\react
react-example@0.0.0 C:\Users\Vicente\Projects\react-example
├─┬ react@0.14.0-beta3
│ └─┬ fbjs@0.1.0-alpha.4
│   ├─┬ promise@7.0.4
│   │ └── asap@2.0.3
│   └── whatwg-fetch@0.9.0
├─┬ react-dom@0.14.0-beta3
│ └─┬ fbjs@0.1.0-alpha.4
│   ├─┬ promise@7.0.4
│   │ └── asap@2.0.3
│   └── whatwg-fetch@0.9.0
└── react-stdio@2.0.7  extraneous

npm WARN optional Skipping failed optional dependency /babel/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@0.3.8
npm WARN optional Skipping failed optional dependency /karma/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@0.3.8
npm WARN optional Skipping failed optional dependency /webpack/watchpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@0.3.8
npm WARN react-hot-api@0.4.5 requires a peer of react@>=0.11.0 || 0.13.0-beta.1
|| 0.13.0-rc1 || 0.13.0-rc2 || 0.14.0-beta1 but none was installed.
npm WARN react-example@0.0.0 No license field.

It looks like fsevents is not supported on windows, but it is just a warning so I don't think this it because the installation is successful.

When I run echo '{"component":".\src\app\components\card","props":{"name":"hello"}}' | react-stdio this is the output (does it help?):

stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^

Error: Invalid JSON (Unexpected "s" at position 16 in state STOP)
    at Parser.proto.charError (D:\npm\node_modules\react-stdio\node_modules\jsonparse\jsonparse.js:78:16)
    at Parser.proto.write (D:\npm\node_modules\react-stdio\node_modules\jsonparse\jsonparse.js:153:21)
    at Stream.<anonymous> (D:\npm\node_modules\react-stdio\node_modules\JSONStream\index.js:23:12)
    at Stream.stream.write (D:\npm\node_modules\react-stdio\node_modules\through\index.js:26:11)
    at Socket.ondata (_stream_readable.js:528:20)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:146:16)
    at Socket.Readable.push (_stream_readable.js:110:10)
    at Pipe.onread (net.js:523:20)

The readme does not mention windows support, if it is not intended I think it should be clear.

Thanks for all your work to make react a better place!

It's a pretty simple app, really. I don't see why it couldn't work on Windows. Looks like chokidar and/or fsevents is the problem. Can you please check with them?

I wasn't aware of chokidar, great tool.

So, chokidar-cli worked on Windows... The installation showed the fsevents warnings, but the execution went fine.

This is weird.

I'm sorry, I don't have a Windows machine so I can't troubleshoot here :/ Please let me know if you get any more info.

I have another Windows machine, and I see the same output above.

I will see if I can get someone else to test it.

I figured it out, haha...

The \ I was using because of Windows was escaping the s from src, causing the parsing error Invalid JSON (Unexpected "s" at position 16.

There are two solutions to this \\ or /.

Thanks for your time and effort on OSS