Registry / http-networking / ember-cli-ic-ajax

ember-cli-ic-ajax

JSON →
library1.0.0jsnpmunverified

The `ember-cli-ic-ajax` package is an Ember CLI addon designed to integrate the `ic-ajax` library into an Ember.js application, making its functionality available within the `vendor.js` build output. `ic-ajax` itself serves as an Ember-friendly wrapper around jQuery's `$.ajax` method, primarily created to provide RSVP promises for asynchronous operations and to simplify AJAX testing through fixture support. This package represents an approach to AJAX management prevalent in earlier Ember ecosystems, preceding the widespread adoption of native `fetch` API or the official `ember-ajax` service (which is now also deprecated in favor of `ember-fetch`). The current stable version, 1.0.0, was released approximately 10 years ago, and both `ember-cli-ic-ajax` and its underlying `ic-ajax` library are no longer actively maintained. Developers should consider modern alternatives like `ember-fetch` for new projects or migrating existing ones, as this package is effectively abandoned.

npm install ember-cli-ic-ajax
INSTALL
IMPORT
SIG · EMBER-CLI-IC-AJAX
E
ember-cli-ic-ajax
http-networkingjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

request
import { request } from 'ic-ajax';
const request = require('ic-ajax').request;
While older Ember CLI setups might have relied on globals, modern Ember (even when using old libraries) prefers explicit ESM imports. The `ic-ajax` library itself ships with AMD/CJS/Global support.
ajax
import ajax from 'ic-ajax';
const ajax = require('ic-ajax');
This provides the default export which is the `ic.ajax` object, allowing calls like `ajax.request()`.
ic.ajax
const { request } = window.ic.ajax; // or Ember.$.ajax for jQuery compatibility
import { ic.ajax } from 'ic-ajax';
For very old Ember CLI applications where `ic-ajax` was globally exposed via `vendor.js`, direct access to `window.ic.ajax` or `ic.ajax` was common. This pattern is not recommended in modern Ember.

Demonstrates fetching data using `ic-ajax`'s `request` method within an Ember component, handling success and error states.

import Component from '@ember/component'; import { action } from '@ember/object'; import { request } from 'ic-ajax'; export default class DataFetcherComponent extends Component { message = 'Click button to fetch data'; data = null; @action async fetchData() { this.set('message', 'Fetching data...'); try { const response = await request('/api/data', { method: 'GET', dataType: 'json' }); this.set('data', response); this.set('message', 'Data fetched successfully!'); } catch (error) { console.error('AJAX Error:', error); this.set('message', `Failed to fetch data: ${error.message || error.statusText}`); } } }
Debug
Known issues
breakingThe `ember-cli-ic-ajax` addon and its underlying `ic-ajax` library are abandoned and have not been updated for approximately 10 years. They are incompatible with modern Ember.js features, best practices, and JavaScript ecosystems.
fix
Migrate to `ember-fetch`, `ember-ajax-fetch`, or native `fetch` for AJAX operations. For Ember Data integration, use the built-in adapter mechanisms or a modern network adapter.
affects: >=1.0.0
gotchaRelies on jQuery for its AJAX implementation. Modern Ember applications increasingly reduce their reliance on jQuery. If jQuery is not available or is removed, `ic-ajax` will fail.
fix
Ensure jQuery is present in your Ember application's build, or preferably, migrate to a modern AJAX solution that does not depend on jQuery.
affects: >=1.0.0
gotcha`ic-ajax` (and by extension `ember-cli-ic-ajax`) is incompatible with Ember's FastBoot server-side rendering, as it directly uses browser-specific jQuery `$.ajax` methods.
fix
For FastBoot-compatible AJAX, use `ember-fetch` or `ember-ajax-fetch`, which provide isomorphic solutions for both browser and Node.js environments.
affects: >=1.0.0
deprecatedThe primary `ember-ajax` addon, which was a successor to `ic-ajax`, is also now deprecated in favor of `ember-fetch` or `ember-ajax-fetch`.
fix
Avoid using `ember-cli-ic-ajax` and its direct successors. Prioritize `ember-fetch` or `ember-ajax-fetch` for new development.
affects: >=1.0.0
Errors
Common errors & fixes
Uncaught ReferenceError: jQuery is not defined
`ic-ajax` is a wrapper around jQuery's `$.ajax` method, and this error indicates jQuery is not loaded or available in the global scope.
fix
Ensure jQuery is correctly included in your Ember application's build process. In modern Ember CLI, this typically involves ensuring `ember-cli-jquery` or similar is installed and configured, or explicitly importing `jquery` if tree-shaken.
Error: Could not find module `ic-ajax` imported from `(unknown entry)`
This error occurs when the `ic-ajax` module cannot be resolved by Ember CLI's module loader, often due to improper installation, a missing `app.import` statement for older addons, or attempting to import a globally exposed library as a module.
fix
Verify that `ember-cli-ic-ajax` is installed correctly via `npm install --save-dev ember-cli-ic-ajax`. If using an older Ember CLI setup, check `ember-cli-build.js` for `app.import('bower_components/ic-ajax/dist/named-amd/main.js', { exports: { 'ic-ajax': ['default', 'request', 'raw', 'defineFixture', 'lookupFixture'] } });` or similar configuration if not handled automatically by the addon blueprint.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
ember-clirequiredThis is an Ember CLI addon, requiring Ember CLI for its build and runtime environment.
jqueryoptional`ic-ajax` is a wrapper around jQuery's `$.ajax` method, making jQuery an implicit runtime dependency.
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
ember-cli-ic-ajax — npm install ember-cli-ic-ajax · libregistry