Skip to content

Commit e7aa080

Browse files
Gaurav0Jen Weber
authored andcommitted
Port over Windows support (#6)
* Port over Windows support * Updates based on comments * Update based on Chris Krycho's comments.
1 parent 9549fa6 commit e7aa080

File tree

2 files changed

+85
-2
lines changed

2 files changed

+85
-2
lines changed

guides/basic-use/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ If Watchman is not installed, a notice is displayed when invoking various comman
3434

3535
### Installing for Windows
3636

37-
<!-- copy over from ember-cli.com -->
37+
Windows Vista and newer Windows versions are fully supported, although there are steps you can take to improve your experience.
38+
You can find more information about this in our section on [Windows support](../reference/windows)
3839

3940
## Getting help
4041

guides/reference/windows.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,83 @@
1-
<!-- Port over info from existing site -->
1+
Windows Vista and newer Windows versions are fully supported.
2+
3+
To get started ensure the following dependencies are installed:
4+
5+
* Node.js - [https://nodejs.org/en/](https://nodejs.org/en/)
6+
* Git - [https://git-scm.com/](https://git-scm.com/)
7+
* Chrome - [https://www.google.com/chrome/](https://www.google.com/chrome/)
8+
9+
### Performance
10+
11+
Although supported, Windows performance, at least by default, isn't as good as
12+
on Linux or MacOS. On a positive note, this story continues to improve. Both
13+
Microsoft, and the Ember CLI team continue to work on improving these developer
14+
ergonomics.
15+
16+
#### What causes the build slowdown?
17+
18+
The two primary reasons are:
19+
20+
* Lack of enabled-by-default symlinks
21+
* Generally slower FS operations on NTFS
22+
23+
#### For the best possible Windows experience
24+
25+
* Use Windows Subsystem Linux [Installation
26+
Guide](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide)
27+
28+
#### Improving your Windows experience
29+
30+
Ensure Search and Defender ignore your project's `tmp` directory:
31+
32+
```bash
33+
npm install -g ember-cli-windows
34+
```
35+
36+
Then, to start the automatic configuration, run:
37+
38+
```bash
39+
ember-cli-windows
40+
```
41+
42+
*Make sure you use an elevated PowerShell.* <!-- Needs Instructions -->
43+
If there was an error, try executing Set-ExecutionPolicy Unrestricted -scope Process first.
44+
45+
[Read more about this from the Microsoft DX Open Source team](http://felixrieseberg.com/improved-ember-cli-performance-with-windows/)
46+
47+
### Enabling symlinks
48+
49+
To create symlinks the account running Ember CLI must have the
50+
`SeCreateSymbolicLinkPrivilege`. Users in the Administrators group have this
51+
permission already. However, if UAC (User Access Control) is enabled, users in
52+
the Administrators group must run their shell using Run As Administrator
53+
because UAC strips away certain permissions from the Administrators +group,
54+
including `SeCreateSymbolicLinkPrivilege`.
55+
56+
![Run As Administrator]({{ site.url }}/assets/images/common-issues/run-as-admin.png)
57+
58+
If the user account is not part of the Administrators group you will need to
59+
add the `SeCreateSymbolicLinkPrivilege` to allow the creation of symlinks. To
60+
do this open the `Local Security Policy` by typing Local Security Policy in the
61+
Windows `Run` Box.
62+
63+
Under `Local Policies` -> `User Rights Assignment` find the `Create symbolic
64+
links` policy and double click it to add a new user or group. Once your user or
65+
group has been added, your user should be able to create symlinks. Keep in mind
66+
if your user is part of the Administrators group and UAC is enabled you will
67+
still need to start your shell using `Run as Administrator`.
68+
69+
![Enabling Symlinks]({{ site.url }}/assets/images/common-issues/enabling-symlinks.png)
70+
71+
### Issues With npm: `EEXISTS`, Path too Long, etc
72+
73+
There were always two major issues with running Node.js on Windows: first and
74+
foremost, the operating system maintains a maximum length for path names, which
75+
clashes with Node's traditional way of nesting modules in `node_modules`. The
76+
second issue was a bit more subtle: The npm installer had a set of steps it
77+
executed for each package and it would immediately start executing them as soon
78+
as it decided to act on a package resulting in hard-to-debug race conditions.
79+
80+
`npm` 3 is a nearly complete rewrite of `npm`, fixing both issues. Windows users of
81+
Ember Cli might want to make the switch to `npm` 3 to benefit from its
82+
flat module installation (solving most issues involving long path names) as well
83+
as its multi-stage installer.

0 commit comments

Comments
 (0)