balderdashy/sails · error

E_INVALID_HTTP_CONFIG

E_INVALID_HTTP_CONFIG

Error message

The `sails.config.express` setting is no longer available in Sails 1.0.\nPlease use `sails.config.http.js` instead (available in `config/http.js` in new apps).

What it means

Error "The `sails.config.express` setting is no longer available in Sails 1.0.\nPlease use `sails.config.http.js` instead (available in `config/http.js` in new apps)." thrown in balderdashy/sails.

Source

Thrown at lib/hooks/http/index.js:146

      //  ┌┐ ┌─┐┌─┐┬┌─┬ ┬┌─┐┬─┐┌┬┐┌─┐  ┌─┐┌─┐┌┬┐┌─┐┌─┐┌┬┐┬┌┐ ┬┬  ┬┌┬┐┬ ┬
      //  ├┴┐├─┤│  ├┴┐│││├─┤├┬┘ ││└─┐  │  │ ││││├─┘├─┤ │ │├┴┐││  │ │ └┬┘
      //  └─┘┴ ┴└─┘┴ ┴└┴┘┴ ┴┴└──┴┘└─┘  └─┘└─┘┴ ┴┴  ┴ ┴ ┴ ┴└─┘┴┴─┘┴ ┴  ┴
      //   ┬   ┌┬┐┌─┐┌─┐┬─┐┌─┐┌─┐┌─┐┌┬┐┬┌─┐┌┐┌  ┬ ┬┌─┐┬─┐┌┐┌┬┌┐┌┌─┐┌─┐
      //  ┌┼─   ││├┤ ├─┘├┬┘├┤ │  ├─┤ │ ││ ││││  │││├─┤├┬┘││││││││ ┬└─┐
      //  └┘   ─┴┘└─┘┴  ┴└─└─┘└─┘┴ ┴ ┴ ┴└─┘┘└┘  └┴┘┴ ┴┴└─┘└┘┴┘└┘└─┘└─┘
      // Backwards compatibility and/or deprecation messages for:
      //  • `sails.config.host`    => `sails.config.explicitHost`.
      //  • `sails.config.express` => `sails.config.http`.
      //  • `sails.config.express.loadMiddleware` => `sails.config.http`.
      //  • `sails.config.cache.maxAge` => `sails.config.http.cache`.
      if (sails.config.host) {
        sails.log.debug('The `sails.config.host` setting is deprecated in Sails 1.0.');
        sails.log.debug('Please use `sails.config.explicitHost` instead.\n');
        sails.config.explicitHost = sails.config.host;
      }

      if (sails.config.express) {
        throw flaverr({ name: 'userError', code: 'E_INVALID_HTTP_CONFIG' }, new Error(
          '\n-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'+
          'The `sails.config.express` setting is no longer available in Sails 1.0.\n'+
          'Please use `sails.config.http.js` instead (available in `config/http.js` in new apps).\n'+
          '-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'
        ));
      }

      if (sails.config.http.loadMiddleware) {
        throw flaverr({ name: 'userError', code: 'E_INVALID_HTTP_CONFIG' }, new Error(
          '\n-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'+
          'The `sails.config.http.loadMiddleware` setting is no longer available in Sails 1.0.\n'+
          'Please use `sails.config.http.middleware.order` instead.\n'+
          '-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'
        ));
      }

      if (sails.config.cache) {
        throw flaverr({ name: 'userError', code: 'E_INVALID_HTTP_CONFIG' }, new Error(

View on GitHub (pinned to 7b76422cc2)

When it happens

Trigger: Thrown at lib/hooks/http/index.js:146 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of balderdashy/sails@7b76422cc2 (2026-09-01). Data as JSON: /api/errors/a23b281280dfff85. Report an issue: GitHub.