{"record":{"id":"570c7a2f89804f2f","repo":"balderdashy/sails","slug":"dev-option-is-deprecated-please-do-not-use-it","errorCode":null,"errorMessage":"`--dev` option is deprecated: Please do not use it.","messagePattern":"`--dev` option is deprecated: Please do not use it\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/app/configuration/load.js","lineNumber":120,"sourceCode":"              return undefined;\n            })(),\n            sockets: (function(){\n              if (overrides.redis) {\n                return { adapter: '@sailshq/socket.io-redis' };\n              }\n              return undefined;\n            })(),\n\n            // `--prod` command-line shortcut\n            // `--staging` command-line shortcut\n            // `--dev` command-line shortcut\n            environment: (function(){\n              if (overrides.staging) {// --staging\n                return 'staging';\n              } else if (overrides.prod){// --prod  (but it's cleaner to use NODE_ENV=production with no other environment instead)\n                return 'production';\n              } else if (overrides.dev) {// --dev  (deprecated)\n                console.warn('`--dev` option is deprecated: Please do not use it.');\n                // Note: we use `console.warn` here because we're not guaranteed\n                // to have a working logger yet.\n                return 'development';\n              } else {\n                return undefined;\n              }\n            })()//†\n\n          });\n\n        } catch (e) { return cb(e); }\n\n        // Pass on overrides object\n        return cb(undefined, overrides);\n      },\n\n\n","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/lib/app/configuration/load.js#L102-L138","documentation":"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.","triggerScenarios":"Lifting with `sails lift --dev`. The supported way to select the development environment is NODE_ENV=development (or no flag, since development is default).","commonSituations":"Old lift scripts or documentation carried over from legacy projects; muscle memory from older Sails versions; CI/deploy scripts invoking sails lift --dev.","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."],"exampleFix":"// before\n\"scripts\": { \"start\": \"sails lift --dev\" }\n// after\n\"scripts\": { \"start\": \"sails lift\" }","handlingStrategy":"validation","validationCode":"if (process.argv.includes('--dev')) { console.warn('Remove deprecated --dev flag; use NODE_ENV instead.'); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["cli","deprecation","environment","sails"],"backgroundTag":"deprecated-cli-option","analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}