balderdashy/sails · warning
`--dev` option is deprecated: Please do not use it.
Error message
`--dev` option is deprecated: Please do not use it.
What it means
Sails warns that the --dev CLI flag is deprecated. When loading configuration, if --dev is present in overrides, Sails prints this console.warn (before a logger exists) and sets the environment to 'development'. The app still lifts; the flag just should not be used anymore.
Source
Thrown at lib/app/configuration/load.js:120
return undefined;
})(),
sockets: (function(){
if (overrides.redis) {
return { adapter: '@sailshq/socket.io-redis' };
}
return undefined;
})(),
// `--prod` command-line shortcut
// `--staging` command-line shortcut
// `--dev` command-line shortcut
environment: (function(){
if (overrides.staging) {// --staging
return 'staging';
} else if (overrides.prod){// --prod (but it's cleaner to use NODE_ENV=production with no other environment instead)
return 'production';
} else if (overrides.dev) {// --dev (deprecated)
console.warn('`--dev` option is deprecated: Please do not use it.');
// Note: we use `console.warn` here because we're not guaranteed
// to have a working logger yet.
return 'development';
} else {
return undefined;
}
})()//†
});
} catch (e) { return cb(e); }
// Pass on overrides object
return cb(undefined, overrides);
},
View on GitHub (pinned to 7b76422cc2)
Solutions
- Remove --dev from your lift command; development is the default environment.
- Set NODE_ENV=development explicitly if you need to force it.
- Update npm scripts/CI configs to drop --dev.
- Use --prod (or NODE_ENV=production) only for production lifts.
Example fix
// before
"scripts": { "start": "sails lift --dev" }
// after
"scripts": { "start": "sails lift" } Defensive patterns
Strategy: validation
Validate before calling
if (process.argv.includes('--dev')) { console.warn('Remove deprecated --dev flag; use NODE_ENV instead.'); } Prevention
- Grep scripts/CI for 'lift --dev' and remove the flag.
- Control environment with NODE_ENV, not CLI flags.
- Review Sails upgrade/migration notes when bumping versions.
When it happens
Trigger: Lifting with `sails lift --dev`. The supported way to select the development environment is NODE_ENV=development (or no flag, since development is default).
Common situations: Old lift scripts or documentation carried over from legacy projects; muscle memory from older Sails versions; CI/deploy scripts invoking sails lift --dev.
Related errors
- E_INVALID_NODE_ENV
- `res.guessView()` is deprecated in Sails >= v1.0. If you wa
- Cannot call res.render() - `req._sails.renderView` was not a
- The 2-ary usage of `res.redirect()` is no longer supported i
- Cannot write to response more than once
AI-assisted analysis of balderdashy/sails@7b76422cc2 (2026-09-01).
Data as JSON: /api/errors/570c7a2f89804f2f.
Report an issue: GitHub.