Famous/framework

Windows installation/setup fails

Open

#17 opened on Jun 18, 2015

View on GitHub
 (22 comments) (0 reactions) (0 assignees)JavaScript (397 stars) (69 forks)batch import
bughelp wanted

Description

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

  • In several places in the code, file/folder paths are not constructed in a platform-agnostic way
  • At least one of the npm packages aren't compatible out-of-the-box with Windows

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

  • In the project scaffolding, the build npm script should be changed to not use mkdir -p
  • The npm scripts in both the scaffolding and the framework codebase should not use $PWD
  • The npm scripts should not be cd-ing around
  • We need to refactor the scaffold and framework npm scripts to use "bin" scripts properly
  • The framework has a couple of pathing helper functions that need to be refactored to differentiate between URL paths and filesystem paths (and use Path.sep for the filesystem ones)
  • In the framework build step for dependency loading, the script is looking in the wrong paths e.g. err Could not find entrypoint file for famous\core\node; this needs to be fixed
  • Folders are created with artifacts that aren't valid on Windows, e.g. the 'public/v1/blocks' folder. The folders within use the naming convention e.g. "famous/core/node" which contain illegal characters ('/') for files/folders on Windows machines.
  • Install on Windows fails due to Python not being installed by default on Windows machines. (Windows 7 and 8?) This isn't listed anywhere as a dependency in the documentation, so the user is left reading the error message from npm indicating Python can't be found. Additionally, after installing Python, the user must set a global variable set PYTHON=C:\path\to\python27\python.exe before attempting the install again. Additionally additionally, it seems Python 3.x is not supported; the user must install Python 2.x.
  • JSDom 3.x depends on Contextify which has known issues with Windows install. Might be able to fix by upgrading to JSDom 4.x, but the last time I checked JSDom 4.x did not run on Node.js (it's only io.js compatible).

Contributor guide