2017-10-24 17 views
5

के बाद सेल उठाने में विफल रहता है मेरे पास एक सर्वर है जो लोचदार बीनस्टॉक पर चल रहा है। यह बहुत अच्छा रहा है। लेकिन आज एक अद्यतन लागू करते समय (कॉन्फ़िगर या मॉड्यूल के वर्जनिंग के साथ बिल्कुल कुछ करने के लिए कुछ नहीं) जो वेब ऐप में कुछ पाठ में कुछ शब्द जोड़ रहा था (शाब्दिक शब्द 'कुत्ता')। ऐप ने 502 nginx गेटवे त्रुटियों के साथ दुर्घटनाग्रस्त होना शुरू कर दिया। मुझे लगता है कि ऐसा इसलिए है क्योंकि ऐप नहीं बढ़ रहा है। मैं गया और परिवर्तन को वापस कर दिया (हालांकि मुझे नहीं लगता था कि मुझे ऐसा करना था)। और समस्या बनी रहती है।सरल अद्यतन

पाल ऐप को उठाने/शुरू करने का प्रयास करते समय मेरा आउटपुट निम्नानुसार है।

Failed to load helper `web/auth/validate-user-password` as a machine! 
A hook (`helpers`) failed to load! 
Failed to lift app: ImplementationError: Sorry, could not interpret "web/auth/validate-user-password" because its underlying implementation has a problem: 
------------------------------------------------------ 
• The `cacheable` property is no longer supported. (Please use `sideEffects: 'cacheable' instead.) 
------------------------------------------------------ 

If you are the maintainer of "web/auth/validate-user-password", then you can change its implementation to solve the problem above. Otherwise, please file a bug report with the maintainer, or fork your own copy and fix that. 
[?] See https://sailsjs.com/support for help. 
    at flaverr (/var/app/current/node_modules/flaverr/index.js:77:15) 
    at helpBuildMachine (/var/app/current/node_modules/sails/node_modules/machine/lib/private/help-build-machine.js:127:11) 
    at Function.build (/var/app/current/node_modules/sails/node_modules/machine/lib/build.js:52:10) 
    at /var/app/current/node_modules/sails/lib/hooks/helpers/load-helpers.js:51:49 
    at /var/app/current/node_modules/@sailshq/lodash/lib/index.js:3228:15 
    at baseForOwn (/var/app/current/node_modules/@sailshq/lodash/lib/index.js:2199:14) 
    at /var/app/current/node_modules/@sailshq/lodash/lib/index.js:3198:18 
    at Function.<anonymous> (/var/app/current/node_modules/@sailshq/lodash/lib/index.js:3501:13) 
    at /var/app/current/node_modules/sails/lib/hooks/helpers/load-helpers.js:37:9 
    at helpBuildDictionary (/var/app/current/node_modules/sails/node_modules/include-all/lib/help-build-dictionary.js:135:10) 
    at Function.module.exports.optional (/var/app/current/node_modules/sails/node_modules/include-all/index.js:67:10) 
    at Hook.loadHelpers (/var/app/current/node_modules/sails/lib/hooks/helpers/load-helpers.js:21:14) 
    at Hook.initialize (/var/app/current/node_modules/sails/lib/hooks/helpers/index.js:28:19) 
    at Hook.wrapper [as initialize] (/var/app/current/node_modules/@sailshq/lodash/lib/index.js:3250:19) 
    at /var/app/current/node_modules/sails/lib/hooks/index.js:88:16 
    at /var/app/current/node_modules/async/dist/async.js:486:20 
(You are seeing the above error message because no custom callback was programmatically provided to `.lift()`.) 
A hook (`orm`) failed to load! 

यह वही है जो मैं पैकेज.जेसन में देख रहा हूं यदि यह मददगार होगा।

{ 
    "name": "sails-xxxxxxx-seed", 
    "private": true, 
    "version": "0.0.3-147", 
    "description": "a Sails application", 
    "keywords": [], 
    "dependencies": { 
    "async": "2.0.1", 
    "aws-sdk": "^2.41.0", 
    "bcryptjs": "2.3.0", 
    "connect-redis": "3.3.0", 
    "flaverr": "^1.1.1", 
    "lodash": "3.10.1", 
    "machinepack-http": "3.1.2", 
    "moment-timezone": "0.5.13", 
    "pdfmake": "0.1.28", 
    "sails": "^1.0.0-32", 
    "sails-hook-orm": "^2.0.0-0", 
    "sails-hook-sockets": "^1.0.1", 
    "sails-mysql": "^1.0.0-13", 
    "sails-stdlib": "^0.7.1", 
    "sails.io.js": "1.1.9", 
    "serve-static": "1.12.3", 
    "socket.io-client": "1.7.3", 
    "socket.io-redis": "3.1.0", 
    "uuid": "3.0.1" 
    }, 
    "devDependencies": { 
    "@angular/animations": "~4.1.3", 
    "@angular/common": "~4.1.3", 
    "@angular/compiler": "~4.1.3", 
    "@angular/compiler-cli": "~4.1.3", 
    "@angular/core": "~4.1.3", 
    "@angular/forms": "~4.1.3", 
    "@angular/http": "~4.1.3", 
    "@angular/platform-browser": "~4.1.3", 
    "@angular/platform-browser-dynamic": "~4.1.3", 
    "@angular/platform-server": "~4.1.3", 
    "@angular/router": "~4.1.3", 
    "@angular/upgrade": "~4.1.3", 
    "@swimlane/ngx-datatable": "^8.0.0", 
    "@types/jasmine": "^2.5.47", 
    "@types/node": "^6.0.48", 
    "angular-pipes": "^6.5.1", 
    "angular-router-loader": "^0.6.0", 
    "angular2-in-memory-web-api": "0.0.21", 
    "angular2-moment": "^1.3.3", 
    "angular2-template-loader": "^0.6.0", 
    "angular2-text-mask": "^8.0.1", 
    "awesome-typescript-loader": "^3.1.2", 
    "babel-core": "^6.25.0", 
    "babel-loader": "^7.0.0", 
    "babel-preset-env": "^1.5.2", 
    "babel-preset-es2015": "^6.24.1", 
    "chart.js": "^2.5.0", 
    "clean-webpack-plugin": "0.1.16", 
    "clipboard": "^1.6.1", 
    "copy-webpack-plugin": "4.0.1", 
    "core-js": "^2.4.1", 
    "css-loader": "0.27.3", 
    "debug": "^2.6.8", 
    "ejs-loader": "0.3.0", 
    "eslint": "3.19.0", 
    "extract-text-webpack-plugin": "2.1.0", 
    "file-loader": "^0.11.1", 
    "glob": "^7.1.1", 
    "ie-shim": "^0.1.0", 
    "json2csv": "^3.7.3", 
    "knex": "0.13.0", 
    "less": "2.7.2", 
    "less-loader": "4.0.1", 
    "mime-types": "2.1.15", 
    "mocha": "^3.2.0", 
    "mydatepicker": "^1.9.2", 
    "ng-sidebar": "^4.1.1", 
    "ng2-charts": "^1.5.0", 
    "ng2-table": "^1.3.2", 
    "ng2-toastr": "^4.0.1", 
    "ng2-validation": "^4.1.0", 
    "ngx-bootstrap": "^1.6.6", 
    "ngx-progressbar": "^2.0.0", 
    "node-sass": "^4.5.2", 
    "primeng": "^4.0.0", 
    "prompt": "1.0.0", 
    "raw-loader": "^0.5.1", 
    "reflect-metadata": "^0.1.3", 
    "rxjs": "5.0.0-beta.12", 
    "sass-loader": "^6.0.3", 
    "semver": "^5.3.0", 
    "to-string-loader": "^1.1.4", 
    "typescript": "~2.2.1", 
    "url-loader": "^0.5.8", 
    "waterline-utils": "^1.3.12", 
    "webpack": "^2.2.1", 
    "webpack-livereload-plugin": "^0.11.0", 
    "webpack-merge": "^0.15.0", 
    "webpack-watch-livereload-plugin": "0.0.1", 
    "zone.js": "~0.6.26" 
    }, 
    "scripts": { 
    "start": "NODE_ENV=production node app.js", 
    "test": "npm run lint && npm run custom-tests && echo 'Done.'", 
    "lint": "node ./node_modules/eslint/bin/eslint . --max-warnings=0 && echo '✔ Your code looks good.'", 
    "custom-tests": "echo \"(No other custom tests yet.)\" && echo", 
    "version": "node -e 'process.stdout.write((require(\"./package.json\").version))'", 
    "bump": "node scripts/bump.js", 
    "debug": "node debug app.js", 
    "deploy-staging": "sails_environment=web_staging npm run bump && sails_environment=web_staging npm run deploy", 
    "deploy-demo": "sails_environment=web_demo npm run bump && npm run deploy", 
    "deploy": "cp -r eb/bootstrap/$sails_environment.sh .ebbootstrap.sh && npm run zip && rm .ebbootstrap.sh && node scripts/publish-static-assets && node scripts/deploy-to-eb", 
    "zip": "mkdir -p .tmp && rm .tmp/deploy.zip &> /dev/null; zip -9 -r --exclude=node_modules/* --exclude=.tmp/* --exclude=.DS_Store --exclude=.git/* --exclude=config/local.js ./.tmp/deploy.zip .", 
    "deploy-alerts-staging": "sails_environment=alerts_staging npm run bump && sails_environment=alerts_staging npm run deploy-alerts", 
    "deploy-alerts": "cp eb/bootstrap/$sails_environment.sh .ebbootstrap.sh && cp eb/apps/alerts/cron.yaml cron.yaml && npm run zip-backend && rm cron.yaml .ebbootstrap.sh && node scripts/deploy-to-eb", 
    "deploy-rollup-staging": "sails_environment=rollup_staging npm run bump && sails_environment=rollup_staging npm run deploy-rollup", 
    "deploy-rollup": "cp eb/bootstrap/$sails_environment.sh .ebbootstrap.sh && cp eb/apps/rollup/cron.yaml cron.yaml && npm run zip-backend && rm cron.yaml .ebbootstrap.sh && node scripts/deploy-to-eb", 
    "deploy-devices-staging": "sails_environment=devices_staging npm run bump && sails_environment=devices_staging npm run deploy-devices", 
    "deploy-devices": "cp eb/bootstrap/$sails_environment.sh .ebbootstrap.sh && npm run zip-backend && rm .ebbootstrap.sh && node scripts/deploy-to-eb", 
    "deploy-device-sim": "cp eb/bootstrap/device_sim.sh .ebbootstrap.sh && cp eb/apps/device-sim/cron.yaml cron.yaml && npm run zip-backend && rm cron.yaml .ebbootstrap.sh && sails_environment=device_sim npm run bump && sails_environment=device_sim node scripts/deploy-to-eb", 
    "zip-backend": "mkdir -p .tmp && rm .tmp/deploy.zip &> /dev/null; zip -9 -r --exclude=node_modules/* --exclude=.tmp/* --exclude=.DS_Store --exclude=.git/* --exclude=src/* --exclude=config/local.js ./.tmp/deploy.zip ." 
    }, 
    "main": "app.js", 
    "repository": { 
    "type": "git", 
    "url": "xxxxxxxxxx.git" 
    }, 
    "author": "xxxxxx", 
    "license": "" 
} 

और नीचे यह शायद कि कि वजह से पाल अपने आप में एक अद्यतन है,

module.exports = { 
    friendlyName: 'Validate user password (strict)', 
    description: 'Strictly validate a string as the potential "password" for a user.', 
    cacheable: true, 
    sync: true, 
    inputs: { 
    string: { 
     description: 'The string to validate as a password.', 
     required: true, 
     example: 'abcd1234', 
    } 
    }, 
    exits: { 
    success: { 
     description: 'The specified string is 100% valid.' 
    }, 
    notValid: { 
     description: 'The specified string is not a valid password.' 
    }, 
    }, 
    fn: function (inputs,exits) { 
    // Coerce 
    ////////////////////////////////////////////////////////////////////////////////////////////////////////// 
    // Since we don't need to support `strict: false` for this validator (it is ALWAYS strict), then we can 
    // just skip this part. (Also no need for the "notStrictlyValid" exit, output from the success exit, 
    // or the `strict` input) 
    // 
    // n/a 
    // Validate 
    ////////////////////////////////////////////////////////////////////////////////////////////////////////// 

    // • Must be long enough. 
    if (inputs.string.length < 7) { 
     return exits.notValid(new Error('Password must consist of at least 7 characters.')); 
    } 

    // • Must not be too long. 
    if (inputs.string.length > 72) { 
     return exits.notValid(new Error('Password must not contain more than 72 characters.')); 
    } 

    return exits.success(); 
    } 
}; 
+1

क्या यह संभव हो सकता है कि सेल के लिए एक मॉड्यूल को अपडेट किया गया हो और एनपीएम इंस्टॉल पर मेरा पैकेज इसे अपग्रेड कर दिया गया हो? –

+0

मुझे कारण पता नहीं है, लेकिन कुछ चीजों का सुझाव दे सकता है जो आप कोशिश कर सकते हैं ... क्या आप सीधे कमांड लाइन से ऐप उठा सकते हैं और देख सकते हैं कि आपको अधिक उपयोगी त्रुटि संदेश मिलते हैं या नहीं? साथ ही, क्या आप एक अलग उपयोगकर्ता के रूप में "जैसे" उठ रहे थे (यानी एक अलग उपयोगकर्ता के रूप में आपके सर्वर में लॉग इन करते समय अपना ऐप शुरू करें)। कभी-कभी इससे कुछ मॉड्यूल को अनुमति देने की अनुमति नहीं मिलती है। – arbuthnott

+0

मुझे एक ही समस्या है। क्या आपको एक समाधान मिला? – bzupnick

उत्तर

0

दरअसल मान्य-उपयोगकर्ता के password.js है। क्या आपने validate-user-password.js के लिए निम्न कॉन्फ़िगरेशन आज़माया है?

module.exports = { 
    friendlyName: 'Validate user password (strict)', 
    description: 'Strictly validate a string as the potential "password" for a user.', 
    sideEffects: 'cacheable', 
    sync: true, 
    /* ... rest of content ... */ 
} 
संबंधित मुद्दे