Famous / framework

Build expressive user interfaces with consistent code and reusable components
MIT License
396 stars 65 forks source link

Windows installation/setup fails #17

Open matthewtoast opened 9 years ago

matthewtoast commented 9 years ago

Installing the framework via the Famous CLI (framework branch) on a Windows machine doesn't work. Two overarching issues at play:


Here are some specific issues I've collected that will need to be resolved for Windows install to work:

talves commented 9 years ago

@matthewtoast :+1:

matthewtoast commented 9 years ago

cc @justincsmith

matthewtoast commented 9 years ago

I've made some initial changes toward resolving this (still more to do, though):

matthewtoast commented 9 years ago

For the npm / installation-related issues, I'm looking at three approaches:

  1. Keep things the same (JSDom 3.x which requires Contextify), and make it a prerequisite for Windows developers to have Python 2.x and Visual Studio Express installed.
  2. Upgrade to JSDom 4.x, and make it a prerequisite that all developers to use io.js (as opposed to Node.js, which JSDom 4.x is incompatible with) until the Node.js/io.js merge is complete and/or JSDom 4.x supports both.
  3. Use a different module than JSDom entirely (Cheerio? PhantomJS? An HTML parser instead of a DOM API module?), sidestepping the issue. (We are currently using JSDom in our build step for processing components' trees.)
talves commented 9 years ago

@matthewtoast for what it is worth, here is my opinion.

I think windows developers will be more apt to accept the option 1 above rather than option 2, because there are so many other solutions having that requirement. They really are easy installs, although VS 2013 Express is bloated.

Option 3 sounds good, but when the merge happens it might have been for naught, because the Option one would go away if JSDom 4.x supports both.

talves commented 9 years ago

I just tried the framework again on Win7 and I now get no errors on install and scaffold. I have to run npm run bundle & npm run local-only-bootstrap in separate shells (no errors), but it the server does not seem to be starting.

Is windows still not supported?

matthewtoast commented 9 years ago

@talves - Tentatively, I think Windows installation/setup is working... However note I haven't updated the Famous CLI tool yet so the $ famous framework-scaffold command is still broken.

I've gone through the full setup process from a blank slate running Windows 8 in Parallels Desktop and got things working.

If you're up for it, you can try it out:

$ git clone https://github.com/Famous/framework.git
$ cd framework
$ git fetch
$ git checkout build-refactor
$ npm install
$ npm run local-only-bootstrap

When I did the above, I saw all of the build logs go by, and was then able to open localhost:1618 in IE and see our "clickable square" demo running.

Note that there are still several rendering issues with IE11 at this time.

If this seems to work for you, can you let me know? If so I'll plan on merging changes in with the CLI tool and hopefully closing out this ticket.

talves commented 9 years ago

I do not mind running it manually. It worked after a couple tries. Get an error twice then finally runs.

The first time I ran npm run local-only-bootstrap the following error happened on the emit

{ [Error: UNKNOWN, open 'C:\git\framework-test\dev\local-workspace\build\famous-tests~dispatcher~emit\famous-tests\dispatcher\emit\child\child.js']
  errno: -4094,
  code: 'UNKNOWN',
  path: 'C:\\git\\framework-test\\dev\\local-workspace\\build\\famous-tests~dispatcher~emit\\famous-tests\\dispatcher\\emit\\child\\child.js' }

I ran it again and get this error

{ [Error: UNKNOWN, open 'C:\git\framework-test\dev\local-workspace\build\famous-tests~pass-through\famous-tests\pass-through\child-component\child-component.jade']
  errno: -4094,
  code: 'UNKNOWN',
  path: 'C:\\git\\framework-test\\dev\\local-workspace\\build\\famous-tests~pass-through\\famous-tests\\pass-through\\child-component\\child-component.jade' }

The third time it runs without an error before the server starts.

trusktr commented 9 years ago

@talves Maybe you can just spin up a Linux distro in Virtualbox, then serve the app to a port that you can access in your Google Chrome in Windows. xD

talves commented 9 years ago

@trusktr that would kind of defeat the purpose of getting windows up and running :smile: It is working now, so no need anyway.

timBrockman commented 9 years ago

in case it helps.. my install went like so:

[ws v0.4.20] Attempting to compile blazing fast native extensions.
[ws v0.4.20] Native code compile failed (but the module will still work):
[ws v0.4.20] The native extensions are faster, but not required.
[ws v0.4.20] On Windows, native extensions require Visual Studio and Python.
[ws v0.4.20] On Unix, native extensions require Python, make and a C++ compiler.
[ws v0.4.20] Start npm with --ws:verbose to show compilation output (if any).
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i
nstall"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.2

npm ERR! unexpected eof
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\xampp\htdocs\angular\fam-fram-test\framework\npm-debug.log

First time I ran npm run local-only-bootstrap:

{ [Error: UNKNOWN, open 'C:\xampp\htdocs\angular\fam-fram-test\framework\dev\local-workspace\build\famous-tests~opacity\
famous-tests\opacity\child\child.js']
  errno: -4094,
  code: 'UNKNOWN',
  path: 'C:\\xampp\\htdocs\\angular\\fam-fram-test\\framework\\dev\\local-workspace\\build\\famous-tests~opacity\\famous
-tests\\opacity\\child\\child.js' }

The second time it served as planned.

migsig commented 9 years ago

Try a 'npm cache clean'

Then run 'famous develop' in the project directory. Should run.

On Jun 28, 2015, at 2:11 PM, Tony Alves notifications@github.com wrote:

I just tried the framework again on Win7 and I now get no errors on install and scaffold. I have to run npm run bundle & npm run local-only-bootstrap in separate shells (no errors), but it the server does not seem to be starting.

Is windows still not supported?

— Reply to this email directly or view it on GitHub.

talves commented 9 years ago

@migsig that was not the problem. Thanks anyway.

Just so the devs know. It works once npm run local-only-bootstrap is re-ran as @timBrockman and I have stated.

migsig commented 9 years ago

oh well good luck.

On Jun 29, 2015, at 12:14 PM, Tony Alves notifications@github.com wrote:

@migsig https://github.com/migsig that was not the problem. Thanks anyway.

— Reply to this email directly or view it on GitHub https://github.com/Famous/framework/issues/17#issuecomment-116746973.

etinin commented 9 years ago

just tried it. first time the npm install failed (the python in my path was 3.4, not 2.7). fixing and rerunning it without deleting the node_modules folder failed.

after deleting and reinstalling, everything worked smoothly.

FrizzaUK commented 9 years ago

Installation worked fine (ish) - however the build (local-only-bootstrap) fails due to invalid path names. It's trying to use ':' in the path whereas that's an invalid character in Windows! Any idea what I need to change to make the bundles build to a valid path and whether anything else needs changing, such as the deployer?

matthewtoast commented 9 years ago

@FrizzaUK - What version of famous-framework do you see in your project's package.json? If you are using < 0.12.1 then it is likely you are missing some updates that fix that issue. (The build should be creating folders with tilde-based namespaces e.g. .foo~bar~baz)

FrizzaUK commented 9 years ago

That could well be it! I am running 0.11.1 - I will update and see what happens. Note to self, make sure everything is up to date!

matthewtoast commented 9 years ago

@FrizzaUK - You should also double check that the npm scripts in your package.json match the ones in this one, since some changes may have been made in there too:

https://github.com/Famous/famous-cli/blob/master/lib/framework/scaffold/templates/_package.json

FrizzaUK commented 9 years ago

Back in business, thanks for your help - I can now crack on with some prototypes.

SvitlanaShepitsena commented 9 years ago

In my case I got node-gyp rebuild error Woof, I finally found a way for it to work:

  1. Install Python 2.x version (I installed 2.73) and add c:\python27 to you global path variables. Check with python
  2. Install Visual Studio 2015 Community edition
  3. Install windows SDK 8.1
  4. Install node-gyp globally npm i –g node-gyp (I run console as admin)
  5. Clone framework repository, npm i – you should get an error “…. you should node-gyp rebuild….”
  6. Give a command: node-gyp configure
  7. After configuring is done, open with Visial Studio binding.sln project in generated build folder in the root of famo.us framework directory. Open please binding.sln not cc file.
  8. After opening VS will prompt you to download missing dependencies – accept, download
  9. Return to your console in the root famo.us and node-gyp rebuild
  10. npm run dev (cross your fingers :pray: ). Jesus, it works!

P.S. Though if you feel that web design is not only your hobby… you (rather we) need to switch to linux or apple :smiley_cat: . Happy coding with framework.

identy commented 9 years ago

uffffff! thk!