I use Cloud9 IDE, which only exposes port 80 and prevents LiveReload from connecting. I get this error:
GET https://myapp.c9.io:35729/livereload.js?snipver=1
net::ERR_CONNECTION_REFUSED
Unless someone knows of a fix, I'd like to simply turn this feature off / disable it.
I'm running Ember-cli and I can see the task in ember-cli/lib/tasks/serve.js and I've commented it out, but it didn't do the trick:
/*
var liveReloadServer = new LiveReloadServer({
ui: this.ui,
analytics: this.analytics,
watcher: watcher
});
*/
It's buried in enough places that I'm afraid to npm remove it, as I think that would just create bigger problems.
You should be able to disable live reload by starting your sever like this:
ember server --live-reload=false
With the addition of the .ember-cli config file, you can just add "liveReload": false to it.
Example '.ember-cli' file
{
"port": 9999,
"host": "0.0.0.0",
"liveReload": false,
"proxy": "http://aqueous-bayou-5108.herokuapp.com/",
"environment": "development"
}
Edit: live-reload was changed to liveReload in this commit
In addition to #Dhaulagiri's answer, you can use:
ember server -lr false
or
ember s -lr false
For all the options:
ember help server
Related
First off all excuse the bad english..
Im develop/build using vue3 + vite2.
Deploy the 'dist' folder on AWS EC2 and run the server with nginx.
And when I connect to that page, I get an error that I can't see.
Has anyone ever seen an error like this?
(When build/run locally, it works normally without errors.)
after a day of suffering, i found that it was due vueI18n plugin in the vite.config.ts file.
import vueI18n from '#intlify/vite-plugin-vue-i18n';
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
plugins: [
vue(),
vueI18n({
include: path.resolve(__dirname, './path/to/src/locales/**'),
}),
],
....
I don't know for what reason,
When I delete that plugin, it worked fine.
the reason for adding vueI18n plugin is because a warning related to bundle install occurred.
i guess is that the plugin conflicts with vite's build environment.
I have an Ember.js addon which Watchman does not seem to operate correctly with. Any changes made to the addon-name/app files do not trigger a rebuild. However, changes to files within addon-name/tests do trigger a rebuild.
I have a .watchmanconfig file set up as follows...
{
"ignore_dirs": [ "tmp", "dist", ".idea", "docs", ".git", "node_modules" ]
}
After running the dummy app with ember s, I checked watchman watch-list and do not see the addon listed in the "roots" category. I've added it manually, but that does not help either, as I'm guessing ember s has to tell watchman what to do when the files are changed.
Any ideas on what might be happening?
OS: Mac OSX High Sierra (10.13.4)
Ember: v3.1.0
Node: v8.11.1
NPM: 6.0.0
Yarn: 1.5.1
If you are using symlink then some times watchman does not track the changes, to track your changes in your addon's index.js add following code
module.exports = {
name: projectName,
isDevelopingAddon: true
};
Hope it helps
When running ember test --host 172.17.0.2 --test-port 4450, I'm getting the following error.
Error: Browser failed to connect within 30s. testem.js not loaded?
Since I'm using a docker container I'm assuming I need to update the host and port to the open docker host and port.
This is my testem.js file
/*jshint node:true*/
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"phantomjs_debug_port": 4500,
"disable_watching": true,
"launch_in_ci": [
"PhantomJS"
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
]
};
This is a general problem you'll see when testing an ember application in continuous integration environments. Multiple users have posted their experiences with the possible bug in this GitHub issue. 2 answers come to mind.
Per Testem's author, you can increase the browser connection timeout.
Compare your ember application's .travis.yml with the canonical version in the ember-new-output repository here. The ember-cli core team and community members have invested a lot of time refining and debugging that .travis.yml to make it work well with ember applications.
I'm trying to deploy a Meteor app using mup and an AWS EC2 micro instance.
I've followed the whole tutorial here http://www.curtismlarson.com/blog/2015/11/03/deploy-meteor-to-aws/, successfully running mup deploy.
However when I go to the instance's Public IP on google chrome or firefox, it simply says:
myapp.com took too long to respond.
If anyone could tell me how I can find the source of this problem, I'd be extremely grateful!
Here's my mup.json:
{
// Server authentication info
"servers": [
{
"host": "52.***.***.***",
"username": "ubuntu",
"pem": "~/************.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.41",
// Install PhantomJS in the server
"setupPhantom": true,
// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,
// Application name (No spaces)
"appName": "menus",
// Location of app (local directory)
"app": "~/menus",
// Configure environment
"env": {
"ROOT_URL": "http://myapp.com"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
The "ROOT_URL": "http://myapp.com" line is exactly how it appears in the file ( I didn't know what else to choose).
Edit: Here's the /opt/menus/config/env.sh file:
#!/bin/bash
export PORT=80
export MONGO_URL=mongodb://127.0.0.1/menus
export ROOT_URL=http://localhost
#it is possible to override above env-vars from the user-provided values
export PORT=\8\0
export ROOT_URL=\h\t\t\p\:\/\/\m\y\a\p\p\.\c\o\m
export METEOR_SETTINGS=\{\"\p\u\b\l\i\c\"\:\{\}\}
export CLUSTER_ENDPOINT_URL=\h\t\t\p\:\/\/\5\2\.\2\0\1\.\2\1\2\.\1\4\2\:\8\0
Those escapes definitely look out of place, but I feel like 1 wrong stroke could leave it still crashing! The fact that ROOT_URL is defined twice is concerning me. How exactly should I proceed?
For me mup still has a bug where the file /opt/myapp/config/env.sh generated by mup was incorrectly formatted (there were some extra spaces and extra escapes). You may want to check that, i.e., ssh into your instance and look at that file. If you need to fix it, do so, and then run mup restart from your development machine.
The second hypothesis I have is that mup doesn't interpret ~. So you may want to try using the resolved path for app, or just the relative path from where your mup.json lives.
Update:
As expected, the env.sh file is wrong (bug in mup). Try this:
#!/bin/bash
export PORT=80
export MONGO_URL=mongodb://127.0.0.1/menus
export ROOT_URL=http://localhost
#it is possible to override above env-vars from the user-provided values
export PORT=80
export ROOT_URL="http://myapp.com"
export METEOR_SETTINGS="{\"public\":{}}"
export CLUSTER_ENDPOINT_URL="http://52.201.212.142:80"
I'm using jest to write tests in my ReactJS application.
So far, to run my test suite, I need to type 'npm test'.
Here's the snippet from package.npm:
"scripts": {
"test": "./node_modules/.bin/jest",
(other stuff)
},
"jest": {
"unmockedModulePathPatterns": ["<rootDir>/node_modules/react"],
"scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
"testFileExtensions": [
"es6",
"js"
],
"moduleFileExtensions": [
"js",
"json",
"es6"
]
},
Is it possible to run those tests within my IDE (IDEA/WebStorm) directly, preserving the configuration? I'm not a js guy, but for example WebStrom works perfectly fine with Karma. Shouldn't this be possible with jest-cli either?
To make Jest test results shown in a tree view (like karma, etc.), a special integration is needed. WebStorm doesn't yet support Jest. Please vote for WEB-14979 to be notified on any progress.
EDIT: as of March 2017 the first version of Jest integration at WebStorm has been released.
In WebStorm 9+ You can set this up as follows:
Install Jest CLI: npm install --save-dev jest-cli
Create node run configuration with javascript file set to node_modules/.bin/jest, and application parameter to --runInBand. runInBand tells jest to run in single process, otherwise there's a port conflict when running multiple node processes in debug mode
Create some tests and run configuration in Debug mode (Ctrl-D/CMD-D). If you set breakpoints in your test or app code they should hit
It would be great though if you could click on file:line numbers in the output to go directly to the code.
app_sciences's answer is awesome, but does not work for Windows.
For windows, you can use next configuration:
Provided configuration is taken from here
For IDEA I'm using https://confluence.jetbrains.com/display/IDEADEV/Run+Configurations for that purposes. For WebStorm it seems you can add your config by yourself https://www.jetbrains.com/webstorm/help/creating-and-editing-run-debug-configurations.html . The configuration you are talking about is on the software level. If you will configure to run it via your IDE it will definitely will run within the ENV variables and paths given, you just need to add the needed global paths and the commands to run.