Semantic-Org/Semantic-UI · warning

Neither $.cookie or store is defined. A storage solution is

Error message

Neither $.cookie or store is defined. A storage solution is required for storing state

What it means

Emitted by Nag's storage remove() (nag.js:252-253) when neither the configured storage backend nor $.cookie is available. Distinct from noCookieStorage only in that it fires on the remove path (e.g. clearing a dismissed nag) rather than set/get. It is a console.error (nag.js:310), not thrown.

Source

Thrown at src/definitions/modules/nag.js:480

  },

  context       : false,
  detachable    : false,

  expires       : 30,
  domain        : false,
  path          : '/',

  // type of storage to use
  storageMethod : 'cookie',

  // value to store in dismissed localstorage/cookie
  key           : 'nag',
  value         : 'dismiss',

  error: {
    noCookieStorage : '$.cookie is not included. A storage solution is required.',
    noStorage       : 'Neither $.cookie or store is defined. A storage solution is required for storing state',
    method          : 'The method you called is not defined.'
  },

  className     : {
    bottom : 'bottom',
    fixed  : 'fixed'
  },

  selector      : {
    close : '.close.icon'
  },

  speed         : 500,
  easing        : 'easeOutQuad',

  onHide: function() {}

};

View on GitHub (pinned to 597843ab84)

Solutions

  1. Provide a working storage adapter (jQuery cookie plugin or available localStorage).
  2. Feature-detect storage availability before initializing nag.
  3. Set storageMethod to a backend supported in the current environment.

Example fix

// before
$('.nag').nag('clear'); // no storage adapter -> noStorage error
// after: ensure an adapter exists first
if (window.localStorage || $.cookie) {
  $('.nag').nag('clear');
}
Defensive patterns

Strategy: fallback

Validate before calling

// Guard dismiss/clear when no storage backend is available.
function storageAvailable(){
  try { return !!window.localStorage || $.cookie !== undefined; }
  catch(e){ return $.cookie !== undefined; }
}
$('#nag .close').on('click', function(){
  if (storageAvailable()) $('.nag').nag('clear');
  else $('.nag').nag('hide');
});

Prevention

When it happens

Trigger: Calling nag dismiss/clear when no storage adapter is present — same conditions as error 73 but on the remove operation (nag.js:249-254).

Common situations: Missing jQuery cookie plugin combined with unavailable localStorage, incognito/sandboxed runtimes, dismissing a nag that was never persistently stored.

Related errors


AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13). Data as JSON: /api/errors/3b80a42870eb0e34. Report an issue: GitHub.