Windows support #160

Closed
ricick opened this Issue Nov 30, 2011 · 27 comments

Comments

Projects
None yet
7 participants

ricick commented Nov 30, 2011

Please make this work on windows.

That would be awesome of you.

@ghost ghost assigned paulmillr Dec 1, 2011

Owner

paulmillr commented Dec 1, 2011

This would be nice to have though I don't have windows etc (tired of virtual machine bullshit). Any windows guys here that want to work on this?

paulmillr added a commit that referenced this issue Dec 2, 2011

Contributor

ccapndave commented Dec 2, 2011

As of Node 0.6.4 on windows npm is installing Brunch, but when running 'brunch watch' it throws the following error:

The "sys" module is now called "util". It should have a similar interface.

fs.js:734
    throw new Error('use fs.watch api instead');
          ^
Error: use fs.watch api instead
    at Object.watchFile (fs.js:734:11)
    at C:\Users\Dave\AppData\Roaming\npm\node_modules\brunch\lib\helpers.js:81:1
4
    at Object.oncomplete (fs.js:810:7)

http://cloudpy.blogspot.com/2011/10/nodejs-windows.html

I have a Python 3.2 script that fixes the issue Fix "The "sys" module is now called "util". It should have a similar interface."

If you want, see my blog.

http://cloudpy.blogspot.com/2011/10/nodejs-windows.html

Windows error on "brunch new"

PS C:\drive\projects\brunch> brunch -v
brunch version 0.8.1
PS C:\drive\projects\brunch> brunch new

fs.js:196
  binding.close(fd, callback || noop);
          ^
TypeError: Bad argument
    at [object Object].<anonymous> (fs.js:196:11)
    at [object Object].flush (fs.js:1303:10)
    at [object Object].<anonymous> (fs.js:1347:8)
    at [object Object].<anonymous> (util.js:478:17)
    at [object Object].emit (events.js:64:17)
    at afterRead (fs.js:1111:12)
    at Object.wrapper [as oncomplete] (fs.js:254:17)

Windows error on "brunch new"

PS C:\drive\projects\brunch> brunch -v
brunch version 0.8.1
PS C:\drive\projects\brunch> brunch new

fs.js:230
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory 'C:\drive\projects\brunch\brunch\index.html'
    at Object.openSync (fs.js:230:18)
    at Object.writeFileSync (fs.js:618:15)
    at Object.createExampleIndex (C:\Users\[your_user_name]\AppData\Roaming\npm\node_modules\brunch\lib\brunch.js:61:15)
    at C:\Users\[your_user_name]\AppData\Roaming\npm\node_modules\brunch\lib\brunch.js:23:17
    at C:\Users\[your_user_name]\AppData\Roaming\npm\node_modules\brunch\lib\helpers.js:61:16
    at C:\Users\[your_user_name]\AppData\Roaming\npm\node_modules\brunch\node_modules\async\lib\async.js:105:25
    at C:\Users\[your_user_name]\AppData\Roaming\npm\node_modules\brunch\lib\helpers.js:37:26
    at C:\Users\[your_user_name]\AppData\Roaming\npm\node_modules\brunch\node_modules\async\lib\async.js:105:25
    at C:\Users\[your_user_name]\AppData\Roaming\npm\node_modules\brunch\lib\helpers.js:37:26
    at C:\Users\[your_user_name]\AppData\Roaming\npm\node_modules\brunch\node_modules\async\lib\async.js:105:25

Same issue here, I am on 0.8.1...

C:\projects\brunch\rythmn>brunch new
The "sys" module is now called "util". It should have a similar interface.

fs.js:230
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory 'C:\projects\brunch\rythmn\brunch\index.html'
    at Object.openSync (fs.js:230:18)
    at Object.writeFileSync (fs.js:618:15)
    at Object.createExampleIndex (C:\Users\meierott\AppData\Roaming\npm\node_modules\brunch\lib\brunch.js:61:15)
    at C:\Users\meierott\AppData\Roaming\npm\node_modules\brunch\lib\brunch.js:23:17
    at C:\Users\meierott\AppData\Roaming\npm\node_modules\brunch\lib\helpers.js:61:16
    at C:\Users\meierott\AppData\Roaming\npm\node_modules\brunch\node_modules\async\lib\async.js:105:25
    at C:\Users\meierott\AppData\Roaming\npm\node_modules\brunch\lib\helpers.js:37:26
    at C:\Users\meierott\AppData\Roaming\npm\node_modules\brunch\node_modules\async\lib\async.js:105:25
    at C:\Users\meierott\AppData\Roaming\npm\node_modules\brunch\lib\helpers.js:37:26
    at C:\Users\meierott\AppData\Roaming\npm\node_modules\brunch\node_modules\async\lib\async.js:105:25

Try spine.js (with coffee!). It is very well documented and it works on windows.
http://spinejs.com/
https://github.com/maccman/spine
npm install -g spine.app hem
spine app my-app
cd my-app
npm install .
hem server

Owner

paulmillr commented Jan 5, 2012

@joesomozawork as I understand, this is not a backbone.js framework.

Also brunch 0.9-beta.1 (would be released in a couple days) would have experimental support of windows.

I am a big fan of brunch so I am looking forward to this! =)

Owner

paulmillr commented Jan 9, 2012

I've set up a virtual machine with windows 8 for the bug.

As I can see in tmpvar/jsdom#360, contextify (jsdom dependency) doesn't support windows because node.js 0.6 doesn't support external C++ modules. This makes brunch not working on windows.

Other issues seem to be fixed for now.

jfmoy commented Feb 27, 2012

What is the status of this issue?

Owner

paulmillr commented Feb 27, 2012

There were no updates and contextify still doesn't work on windows.

jsalonen commented Mar 6, 2012

Right now getting contextify to work on Windows is a battle. If interested, see my notes.

I strongly believe that dev tools should work easily - cross-platform. Thus, this issue is a showstopper for me.

Owner

paulmillr commented Mar 6, 2012

Of course this is easy to do, but we need a legit automatic npm way. When the fixed version of contextify will be on npm, the ball will start rolling.

jsalonen commented Mar 6, 2012

Agreed. Gotta wait then.

Owner

paulmillr commented Mar 6, 2012

Anyway, even if they'll release fix tomorrow, this wouldn't be done because 1.0 needs to be released in March with stable API, there's some unclosed issues. This targets 1.1-april unless someone will provide a patch.

Sorry.

jfmoy commented Mar 6, 2012

I agree that it should work on every platform. Is there any alternative to
contextify we could implement?
On Mar 6, 2012 4:47 PM, "jsalonen" <
reply@reply.github.com>
wrote:

Right now, getting contextify to work on Windows is a fight (if
interested, see my notes). I strongly
believe that dev tools should work (easily!) cross-platform.

For me, this issue is a showstopper.


Reply to this email directly or view it on GitHub:
#160 (comment)

Owner

paulmillr commented Apr 3, 2012

Just pushed some updates -- master version is now working on windows.

jsalonen commented Apr 3, 2012

This is absolutely AWESOME news!

I can confirm that brunch now install on Windows (Win7, 64-bit) as follows:

git clone https://github.com/brunch/brunch.git
cd brunch
npm install -g .

However:

brunch new test1

Gives:

3 Apr 15:25:25 - error: Skeleton 'undefined' doesn't exist

Is there something I'm doing wrong or is this a valid bug?

Owner

paulmillr commented Apr 3, 2012

Yep, also there are some issues with:

  • Skeletons, their pathes in config.coffee are written in unix-way with / (slashes)
  • Plugins, many of them don't compile on windows.

But these are going to be fixed in a couple days.

jsalonen commented Apr 3, 2012

Great! This is awesome work, thanks!

And as said, The installation now works, at the least.

Owner

paulmillr commented Apr 3, 2012

@jsalonen I moved skeleton to separate repo so you'll need to do git submodule update or so in brunch dir.

jsalonen commented Apr 3, 2012

@paulmillr Thanks for the hint. I invoked:

git clone --recurse-submodules https://github.com/brunch/brunch.git

Thus, brunch new appname now works.

Owner

paulmillr commented Apr 3, 2012

To make brunch b / w work you'll also need to:

  • change package.json deps to git versions (e.g. git://github.com/brunch/sass-brunch.git)
  • run npm install (it may be broken, so another way is to clone modules manually in node_modules)
  • change pathes from vendor/styles/normalize.css to vendor\\styles\\normalize.css. Cross-platform way is to import sysPath = require 'path' and then sysPath.join 'vendor', 'styles', 'normalize.css'.
Owner

paulmillr commented Apr 10, 2012

ok, this seems to be working for now.

@paulmillr paulmillr closed this Apr 10, 2012

Btw. Thanks a lot for fixing this! Works flawlessly on Windows now.

Owner

paulmillr commented Apr 14, 2012

np! 1.1 with windows support will be out in 12 hours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment