Skip to content

Commit b3d01d2

Browse files
BradenLawrenceJen Weber
authored and
Jen Weber
committed
Common issues transfer (#12)
* Add common issues markdown from ember-cli.com - Addressing issue #3, item 10, "Port over Common Issues. Mostly copy and paste from this source code" - Converted the markdown file found here: https://raw.githubusercontent.com/ember-cli/ember-cli.github.io/master/_posts/2013-04-03-common-issues.md * Update internal link to the Windows Support section * Modify common-issues.md content per @sandstrom's suggestions - Clarify the heading for the npm packages section - Add a description for the Canary build section - Remove PhantomJS section - Fix the link to Vagrant to include https * Remove references to PhantomJS in the Docker section - Commenting out Docker section until it can be rewritten without using PhantomJS
1 parent 95afec1 commit b3d01d2

File tree

1 file changed

+105
-1
lines changed

1 file changed

+105
-1
lines changed

guides/reference/common-issues.md

+105-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,105 @@
1-
<!-- copy over from ember-cli.com -->
1+
### Don't install `npm` packages with `sudo`
2+
3+
Installing packages such as `bower` with `sudo` powers can lead to permissions
4+
issues and ultimately to problems installing dependencies. See
5+
[https://gist.github.com/isaacs/579814](https://gist.github.com/isaacs/579814)
6+
for a collection of various solutions.
7+
8+
### Installing From Behind a Proxy
9+
10+
If you're behind a proxy, you might not be able to install because Ember CLI–or
11+
some of its dependencies–tries to `git clone` a `git://` URL. (In this scenario,
12+
only `http://` URLs will work).
13+
14+
You'll probably get an error like this:
15+
16+
```bash
17+
npm ERR! git clone git://github.com/jgable/esprima.git Cloning into bare repository '/home/<username>/.npm/_git-remotes/git-git.colasdn.top-jgable-esprima-git-d221af32'...
18+
npm ERR! git clone git://github.com/jgable/esprima.git
19+
npm ERR! git clone git://github.com/jgable/esprima.git fatal: unable to connect to github.com:
20+
npm ERR! git clone git://github.com/jgable/esprima.git github.com[0: 192.30.252.129]: errno=Connection timed out
21+
npm ERR! Error: Command failed: fatal: unable to connect to github.com:
22+
npm ERR! github.com[0: 192.30.252.129]: errno=Connection timed out
23+
```
24+
25+
As a workaround you can configure `git` to make the translation:
26+
27+
```bash
28+
git config --global url."https://".insteadOf git://
29+
```
30+
31+
### Using Canary Build instead of release
32+
33+
In most cases you should use a stable release, but if you need to install a canary version to test beta features, you'd do it like this:
34+
35+
For Ember: `bower install ember#canary --resolution canary`
36+
For `ember-data`: `npm install --save-dev emberjs/data#master`
37+
38+
### Windows Build Performance Issues
39+
40+
See [The Windows Section](/release/reference/windows/) for more details.
41+
42+
### Cygwin on Windows
43+
44+
Node.js on Cygwin is no longer supported [more
45+
details](https://github.com/nodejs/node/wiki/Installation#building-on-cygwin)
46+
Rather then using Cygwin, we recommend running Ember CLI natively on windows,
47+
or via the new [Windows Subsystem
48+
Linux](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide).
49+
50+
<!-- ### Usage with Docker -->
51+
<!-- Possible topic for future development. -->
52+
53+
54+
### Usage with Vagrant
55+
56+
[Vagrant](https://vagrantup.com) is a system for automatically creating and
57+
setting up development environments that run in a virtual machine (VM).
58+
59+
Running your Ember CLI development environment from inside of a Vagrant VM will
60+
require some additional configuration and will carry a few caveats.
61+
62+
#### Ports
63+
64+
In order to access your Ember CLI application from your desktop's web browser,
65+
you'll have to open some forwarded ports into your VM. Ember CLI by default
66+
uses two ports.
67+
68+
* For serving assets the default is `4200`. Can be configured via `--port 4200`.
69+
* For live reload there is no default. Can be configured via `---live-reload-port=9999`.
70+
71+
To make Vagrant development seamless these ports will need to be forwarded.
72+
73+
```ruby
74+
Vagrant.configure("2") do |config|
75+
# ...
76+
config.vm.network "forwarded_port", guest: 4200, host: 4200
77+
config.vm.network "forwarded_port", guest: 9999, host: 9999
78+
end
79+
```
80+
81+
#### Watched Files
82+
83+
The way Vagrant syncs directories between your desktop and vm may prevent file
84+
watching from working correctly. This will prevent rebuilds and live reloads
85+
from working correctly. There are several work arounds:
86+
87+
1. Watch for changes by polling the file system via: `ember serve --watcher polling`.
88+
2. Use [nfs for synced folders](https://docs.vagrantup.com/v2/synced-folders/nfs.html).
89+
90+
#### VM Setup
91+
92+
When setting up your VM, install Ember CLI dependencies as you normally would.
93+
Some of these dependencies (such as [broccoli-sass](#sass)) may have native
94+
depenencies that may require recompilation. To do so run:
95+
96+
```bash
97+
npm rebuild
98+
```
99+
100+
#### Provider
101+
102+
The two most common Vagrant providers, VirtualBox and VMware Fusion, will both
103+
work. However, VMware Fusion is substantially faster and will use less battery
104+
life if you're on a laptop. As of now, VirtualBox will use 100% of a single CPU
105+
core to poll for file system changes inside of the VM.

0 commit comments

Comments
 (0)