{"id":16994,"library":"ember-cli-ic-ajax","title":"Ember CLI IC Ajax","description":"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.","status":"abandoned","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/rjackson/ember-cli-ic-ajax","tags":["javascript","ember-addon"],"install":[{"cmd":"npm install ember-cli-ic-ajax","lang":"bash","label":"npm"},{"cmd":"yarn add ember-cli-ic-ajax","lang":"bash","label":"yarn"},{"cmd":"pnpm add ember-cli-ic-ajax","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This is an Ember CLI addon, requiring Ember CLI for its build and runtime environment.","package":"ember-cli","optional":false},{"reason":"`ic-ajax` is a wrapper around jQuery's `$.ajax` method, making jQuery an implicit runtime dependency.","package":"jquery","optional":true}],"imports":[{"note":"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.","wrong":"const request = require('ic-ajax').request;","symbol":"request","correct":"import { request } from 'ic-ajax';"},{"note":"This provides the default export which is the `ic.ajax` object, allowing calls like `ajax.request()`.","wrong":"const ajax = require('ic-ajax');","symbol":"ajax","correct":"import ajax from 'ic-ajax';"},{"note":"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.","wrong":"import { ic.ajax } from 'ic-ajax';","symbol":"ic.ajax","correct":"const { request } = window.ic.ajax; // or Ember.$.ajax for jQuery compatibility"}],"quickstart":{"code":"import Component from '@ember/component';\nimport { action } from '@ember/object';\nimport { request } from 'ic-ajax';\n\nexport default class DataFetcherComponent extends Component {\n  message = 'Click button to fetch data';\n  data = null;\n\n  @action\n  async fetchData() {\n    this.set('message', 'Fetching data...');\n    try {\n      const response = await request('/api/data', {\n        method: 'GET',\n        dataType: 'json'\n      });\n      this.set('data', response);\n      this.set('message', 'Data fetched successfully!');\n    } catch (error) {\n      console.error('AJAX Error:', error);\n      this.set('message', `Failed to fetch data: ${error.message || error.statusText}`);\n    }\n  }\n}","lang":"typescript","description":"Demonstrates fetching data using `ic-ajax`'s `request` method within an Ember component, handling success and error states."},"warnings":[{"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.","message":"The `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.","severity":"breaking","affected_versions":">=1.0.0"},{"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.","message":"Relies 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.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"For FastBoot-compatible AJAX, use `ember-fetch` or `ember-ajax-fetch`, which provide isomorphic solutions for both browser and Node.js environments.","message":"`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.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Avoid using `ember-cli-ic-ajax` and its direct successors. Prioritize `ember-fetch` or `ember-ajax-fetch` for new development.","message":"The primary `ember-ajax` addon, which was a successor to `ic-ajax`, is also now deprecated in favor of `ember-fetch` or `ember-ajax-fetch`.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"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.","cause":"`ic-ajax` is a wrapper around jQuery's `$.ajax` method, and this error indicates jQuery is not loaded or available in the global scope.","error":"Uncaught ReferenceError: jQuery is not defined"},{"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.","cause":"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.","error":"Error: Could not find module `ic-ajax` imported from `(unknown entry)`"}],"ecosystem":"npm","meta_description":null}