Livereload
I'm having problems getting Ember CLI (1.13.15) to detect changes. When I create a new application with
ember init
And run the development server with
ember serve
The project compiles and I see the page. When I change something, the server detects changes in the console, but nothing happens even if I refresh page. The changes become visible only after I rerun the ember serve
Slow build
Also on an empty app it takes 30 sec to build app on Samsung 850 Pro SSD & i7 2600k with admin rights and after ember-cli-windows run. (the build on half slower MacBook Air is almost instantaneous).
Versions
Windows 10 with all the updates
ember-cli: 1.13.15
node: 4.2.6
npm: 2.14.10
I just encountered this as well -- seemingly out of nowhere, at once, on several different projects. Making sure I had this in .ember-cli was a winning fix:
"liveReload": true,
"watcher": "polling"
[Update]
I already had liveReload: true, so adding the watcher setting seems to be what was needed. Furthermore the projects that I implemented this for were using ember-cli at 1.13.13, 2.2.0-beta.6 and 2.3.0-beta.1, with the following system config:
node: 4.2.4
npm: 2.14.10
os: darwin x64
There's currently a known issue in ember-cli where the open port for livereload isn't detected correctly (https://github.com/ember-cli/ember-cli/pull/5391). You should be able to get around this for now by running ember serve --host 0.0.0.0.
For now, the best solution seems to be sticking to the old versions. Also there seems to be an issue with latest sass plugin not recognizing changes so I recommend downgrading both to:
ember-cli: 1.13.8,
ember-cli-sass: 4.2.1
Related
When I specify no port or set the port explicitly, I always see:
ember serve --port 4207
Port 4207 is already in use.
It doesn't seem to matter which port I pick.
When I start with port 0 (let the cli pick an available port) it starts on on something around 30000~40000.
I am on a Mac. I just upgraded my ember-cli to 3.12.0
Also: If I start another ember app I have locally, it will run on port 4200. But then I stop it and start the above app and it won't start on that port.
What is wrong here?
portfinder, which is a subdependency of Ember CLI, released a new version 1.0.22 a few hours ago (August 17, 2019). That one breaks ember serve. You will see a port in use error for all ports.
If you are unsure which version of portfinder is used in your project, you could run yarn why portfinder or npm list | grep portfinder.
Update: portfinder#1.0.23 was released today (August, 19 2019). It rolls back to 1.0.21 and therefore fixes the issue. You should upgrade to that new release.
The following work-a-rounds are outdated by new release of portfinder.
There are two work-a-round known so far:
1. Downgrading portfinder to 1.0.21.
You could use yarn's resolutions feature to do so. Add this to your package.json:
"resolutions": {
"ember-cli/portfinder": "1.0.21"
}
Don't forget to run yarn install afterwards.
If using npm, you could enforce installing dependencies released before today using the --before option: npm install --before 2019-08-16
2. Using ember serve --port 0
You could start ember serve with --port 0 argument. In that case portfinder picks up a random port. This seems to work. The port used is reported in terminal, e.g.
Build successful (1911ms) – Serving on http://localhost:18780/
The bug is reported here. Hopefully it will be resolved soon.
I believe I may have an environment issue here, but I'm quite stuck as to what I can to do resolve it. I created an ember-cli project, committed it to git, added a few things. I ran the typical npm install && bower install commands and tried ember s.
Although the site loads fine, when I browsed to the http://localhost:4200/tests/ to ensure qunit was up and running, I had a few errors.
Uncaught Error: Could not find module `ember-qunit` imported from `ember-project/tests/test-helper
Uncaught Error: Assertion Failed: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js".
Immediately this raised a red flag, as I have created several ember projects before and not run into similar issues. I had my partners (I'm in school) checkout the project, run the npm install && bower install && ember s and the qunit module worked fine for them!
I've tried to git clone a new repo several times, I've even went so far as to uninstall node and bower completely, but no matter what I try I cannot seem to pull up a normal /tests checkout.
My partners were both running VMs - Ubuntu and Debian, while I'm on a mac, but that seems like it shouldn't be too big of an issue, especially since I created the project!
I've looked several places for this (here, here, and here), but I cannot seem to come to a conclusion which works for me.
I do have an identical bower.json as the rest of my group. I've included the picture below of my file structure, my bower.json, and my tests/index.html.
screenshot
Here are some environment stats:
ember version: 1.13.13
node: 5.0.0
os: darwin x64
bower: 1.7.1
One thing that I did notice is a difference when I do this to see npm's version, but I'm not sure if that matters or not.
ember -v
npm: 2.14.10
npm -v
npm: 3.5.2
It appears to be a regression from the work in ember-cli beta. You can track the progress here https://github.com/ember-cli/ember-cli/issues/5411.
For now, you can add
app.import('bower_components/qunit/qunit/qunit.js');
app.import('bower_components/ember-qunit/ember-qunit.amd.js');
to ember-cli-build.js as a workaround.
I'm unsure why my ember does not start. When I type ember server, I see
PS C:\Users\lzc\Ember-Prototype> ember s
version: 0.2.3
A new version of ember-cli is available (0.2.7). To install it, type ember update.
Livereload server on port 35729
Serving on http://localhost:4200/
PS C:\Users\lzc\Ember-Prototype>
I'm pretty sure its not the outdated CLI, because it was working very well for the pas week. When I type ember build, it instantly reads 'Building...` then finishes. Normally my builds are 60 to 80 seconds. I can't identify whether this is a compile issue or settings flaw. Shouldn't Ember-CLI give an error message if something went wrong like this?
Has anyone experienced this before?
Can't run `--verbose', no command in CLI. Issue was when liquid modal tried to register transitions, one of the path strings was incorrect. No error messages given.
I'm using ember cli for some small test projects to evaluate the concepts. Normal use of ember cli works for me. After 10 created small projects and using blueprints and the pod structure I decided to try the development and usage of addons. The creation of addons was not the real problem.
The problem is I can not successfully install a created addon. I also tried to install other addons created by other ember-cli users. The result is always the same. I got no error message and the addon could be found inside the node_modules directory of the addon consuming application but there is nothing installed in the app directory and it's sub directories !!!
What can I do to find the problem ?
Do you have a public available addon which could be installed definitely without problems ?
Are there log files which could be inspected to see more details (hidden error messages) ?
Best regads
Andreas
The current Ember CLI version is 0.0.12. I'm not aware of any issues with addon installations. If the issue persist, you should create an issue on ember-cli issue tracker.
I've been trying to use Ember CLI to set up a new ember install, but the process keeps dying when trying to install ember-cli-qunit. I'm relatively new to using npm, bower, and ember so maybe this could just be an issue with me being dumb. Here is the dump I get when running
ember new webapp
I've been working on this for a few hours and can't really figure out how to fix the issue.
Thanks in advance
You must have ran bower as root at some point, and that would've changed the permissions of bower's cache files in your home directory (as per the error in the EACCESS line). Simply changing the permissions back to your own user (as root of course) should fix the problem.
Because of similar sudo problems driving me crazy (and the system's nodejs package being dated) I switched my setup to nvm: node version manager which installs everything to my own home directory instead and I never need to use root again for node-related installations.