When I am running: ember test --filter="acceptance", I am getting this warning:
Torii is installed but not configured in config/environment.js.
What should I do to fix this?
Add this to config/environment.js
torii: {
sessionServiceName: 'session'
},
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 tried to use ember cli to generate local project, but when visiting localhost:4200, I met below errors:
Error occurred:
- While rendering:
-top-level
application
Uncaught Error: Decorating class property failed. Please ensure that proposal-class-properties is enabled and runs after the decorators transform.
and ember -v gives this:
ember-cli: 3.28.4
node: 16.13.1
os: darwin x64
Please help to point out the reason.
Thanks
In your package.json change
"ember-cli-babel": "^7.26.6"
to
"ember-cli-babel": "7.26.6"
the credit for the answer goes to the Ember community on Discord
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
I'm trying to debug a qunit ember integration test on Webstorm. Qunit is the same framework that ember is tested with.
Our test is similar to this:
import startApp from '../helpers/start-app';
var App;
module('Integration Tests', {
setup: function() {
App = startApp();
},
teardown: function() {
Ember.run(App, 'destroy');
});
test("Checking hub page",function(){
expect(2);
visit('/hub');
andThen(function(){
console.log(currentRouteName());
ok('in to the function');
});
});
I am trying these settings:
Edit------------------------------
I updated my run config but the application exits with the following error:
debugger listening on port 59771
version: 0.1.7
Could not find watchman, falling back to NodeWatcher for file system events
BuildingBuilding.Building..Building...Building...
Build successful - 1853ms.
c[?25l[8;NaNrtty.setRawMode: Use `process.stdin.setRawMode()` instead.
tty.js:37
throw new Error('can\'t set raw mode on non-tty');
^
You should have used ember to run your code. And you are running it as a simple node.js application (node foo-test.js). Moreover, Node won't accept EcmaScript 6 syntax unless being run with --harmony switch. Please make sure to update your run configuration accordingly (to run ember and pass your spec as a parameter to it)
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