-
-
Notifications
You must be signed in to change notification settings - Fork 87
Fails with Octane blueprint #439
Comments
The octane blueprint should not depend on ember-ajax, would you mind filing a bug for that? |
Blueprint doesn’t depend on it but my app does :) I’m actually a little unclear on why it was throwing this error since in my stack trace it was throwing on Ember.$ being unavailable, whereas ^ points to a jQuery import. I also tried installing jQuery manually but still same stack trace. My only guess is that I have multiple versions of ember-Ajax and some history version depends on Ember.$. Didn’t finish the trace. |
It seems like I've stumbled into the same case while trying to work through the superrentals tutorial with an ember octane app. My minimal reproduction steps are as follows (repository): ember new octane-with-ember-ajax -b @ember/octane-app-blueprint --yarn --no-welcome
cd octane-with-ember-ajax/
ember g route index
ember install ember-ajax Add the following import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class IndexRoute extends Route {
@service ajax;
} The following error appears in Chromes Console:
Where the contents of define("ember-ajax/utils/ajax", ["exports"], function (_exports) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
const ajax = typeof FastBoot === 'undefined' ? Ember.$.ajax : FastBoot.require('najax');
var _default = ajax;
_exports.default = _default;
}); which leads me to believe this is the transpiled output of https://github.com/ember-cli/ember-ajax/blob/master/addon/utils/ajax.ts#L4 . The question I can't answer is why the imported What are the next steps to get a working octane/ember-ajax combination? I'd be happy to assist with my limited means. Thanks!
Edit: Added a link to my repository for ease of reproduction |
@samuelherzog - Thank you for reporting! I think we need to migrate this to an issue in the ember-learn/guides repo, would you mind doing that? |
@rwjblue happy to do that. One question which might be related: I since learned that I can get things running by running |
@samuelherzog I think we should actually make ember-simple-leaflet-maps not depend on ember-ajax (because the octane blueprint will not ship with jQuery). I created ember-learn/ember-simple-leaflet-maps#2 to track that (but we still need to track the issue in the guides too). |
Just tried running my app with the Octane blueprint and boot failed because jquery is used in this addon. It looks like it's not specified as a dependency though, so it's failing to import:
The text was updated successfully, but these errors were encountered: