{"record":{"id":"9f382d2c24489c9a","repo":"balderdashy/sails","slug":"you-may-consider-running","errorCode":null,"errorMessage":"You may consider running:","messagePattern":"You may consider running:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"errors/warn.js","lineNumber":54,"sourceCode":"\n  noPackageJSON: function() {\n    log.warn('Cannot read package.json in the current directory (' + process.cwd() + ')');\n    log.warn('Are you sure this is a Sails app?');\n    log.warn();\n  },\n\n  notSailsApp: function() {\n    log.warn('The package.json in the current directory does not list Sails as a dependency...');\n    log.warn('Are you sure `' + process.cwd() + '` is a Sails app?');\n    log.warn();\n  },\n\n  badLocalDependency: function(pathToLocalSails, requiredVersion) {\n    log.warn(\n      'The local Sails dependency installed at `' + pathToLocalSails + '` ' +\n      'has a corrupted, missing, or un-parsable package.json file.'\n    );\n    log.warn('You may consider running:');\n    log.warn('rm -rf ' + pathToLocalSails + ' && npm install sails@' + requiredVersion);\n    log.warn();\n  }\n};\n","sourceCodeStart":36,"sourceCodeEnd":59,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/errors/warn.js#L36-L59","documentation":"This is a warning emitted by Sails when the local Sails dependency in node_modules has a corrupted, missing, or un-parseable package.json. Sails logs two follow-up lines, and this one ('You may consider running:') introduces the suggested repair command in the next line. It exists to help developers recover a broken local install of Sails without guessing at the right version.","triggerScenarios":"Sails calls badLocalDependency(pathToLocalSails, requiredVersion) during lift when the package.json of the locally installed Sails at pathToLocalSails cannot be read or parsed, or is missing.","commonSituations":"Interrupted npm installs, manually edited or deleted node_modules/sails/package.json, partial git commits that excluded node_modules files, corrupted caches, or symlinks to a broken Sails checkout.","solutions":["Delete the broken Sails directory and reinstall: rm -rf node_modules/sails && npm install sails@<requiredVersion>","If corruption is widespread, remove node_modules entirely and run npm install (or npm ci) fresh.","Verify package-lock.json / yarn.lock points at the intended Sails version and reinstall from a clean cache (npm cache clean --force)."],"exampleFix":"// before (broken local dep)\nnode_modules/sails/package.json  // corrupted / unparsable\n// after\nrm -rf node_modules/sails && npm install sails@1.5.3","handlingStrategy":"validation","validationCode":"const pkg = require('fs').existsSync('./node_modules/sails/package.json') && JSON.parse(require('fs').readFileSync('./node_modules/sails/package.json','utf8'));\nif (!pkg || !pkg.version) console.warn('Local sails install is corrupt; reinstall before lifting.');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never hand-edit files inside node_modules.","Use npm ci in CI for reproducible installs.","Commit package-lock.json and verify sails version after install."],"tags":["node-modules","package-json","installation","warning"],"backgroundTag":"corrupted-local-dependency","analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}