Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MEU package.json
- {
- "name": "umbler-node",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "start": "node App"
- },
- "author": "Rodrigo",
- "license": "ISC",
- "dependencies": {
- "bcryptjs": "^2.4.3",
- "body-parser": "^1.18.2",
- "check-node-version": "^2.1.0",
- "cluster": "^0.7.7",
- "connect-multiparty": "^2.1.0",
- "consign": "^0.1.6",
- "cors": "^2.8.4",
- "express": "^4.15.2",
- "express-validator": "^5.1.0",
- "jsonwebtoken": "^8.2.0",
- "mongodb": "^3.0.5",
- "mongoose": "^5.0.12",
- "os": "^0.1.1"
- }
- }
- onde acusa o erro de sintaxe:
- userSchema.pre('save', async function(next) {
- if(this.isModified('password')){
- const hash = await bcrypt.hash(this.password, 10);
- this.password = hash
- next();
- }else{
- next();
- }
- })
- 2018-04-12 15:53:06Z > node App
- 2018-04-12 15:53:06Z > umbler-node@1.0.0 start /usr/src/app
- 2018-04-12 15:53:06Z npm info it worked if it ends with ok
- 2018-04-12 15:53:06Z npm info lifecycle umbler-node@1.0.0~prestart: umbler-node@1.0.0
- 2018-04-12 15:53:06Z npm info lifecycle umbler-node@1.0.0~start: umbler-node@1.0.0
- 2018-04-12 15:53:06Z npm info using node@v6.11.3
- 2018-04-12 15:53:06Z npm info using npm@3.10.10
- 2018-04-12 15:53:07Z + ./app/controllers/noIMG.json
- 2018-04-12 15:53:07Z + ./app/controllers/produtosController.js
- 2018-04-12 15:53:07Z + ./app/controllers/userController.js
- 2018-04-12 15:53:07Z + ./app/models/auth.json
- 2018-04-12 15:53:07Z + ./app/models/produtosModel.js
- 2018-04-12 15:53:07Z + ./app/models/Schemas/produtosSchema.js
- 2018-04-12 15:53:07Z + ./app/models/Schemas/userSchema.js
- 2018-04-12 15:53:07Z + ./app/models/userModel.js
- 2018-04-12 15:53:07Z + ./app/routers/inicio.js
- 2018-04-12 15:53:07Z + ./app/routers/produtos.js
- 2018-04-12 15:53:07Z + ./app/routers/user.js
- 2018-04-12 15:53:07Z + ./config/dbConnection.js
- 2018-04-12 15:53:07Z consign v0.1.6 Initialized in /usr/src/app
- 2018-04-12 15:53:08Z
- 2018-04-12 15:53:08Z ^^^^^
- 2018-04-12 15:53:08Z at Consign.into (/usr/src/app/node_modules/consign/lib/consign.js:232:15)
- 2018-04-12 15:53:08Z at createScript (vm.js:56:10)
- 2018-04-12 15:53:08Z at Function.Module._load (module.js:438:3)
- 2018-04-12 15:53:08Z at Module._compile (module.js:542:28)
- 2018-04-12 15:53:08Z at Module._compile (module.js:570:32)
- 2018-04-12 15:53:08Z at Module.load (module.js:487:32)
- 2018-04-12 15:53:08Z at Module.require (module.js:497:17)
- 2018-04-12 15:53:08Z at Object.<anonymous> (/usr/src/app/config/server.js:40:6)
- 2018-04-12 15:53:08Z at Object.Module._extensions..js (module.js:579:10)
- 2018-04-12 15:53:08Z at Object.runInThisContext (vm.js:97:10)
- 2018-04-12 15:53:08Z at require (internal/module.js:20:19)
- 2018-04-12 15:53:08Z at tryModuleLoad (module.js:446:12)
- 2018-04-12 15:53:08Z /usr/src/app/app/models/Schemas/userSchema.js:23
- 2018-04-12 15:53:08Z npm ERR!
- 2018-04-12 15:53:08Z npm ERR! /usr/src/app/npm-debug.log
- 2018-04-12 15:53:08Z npm ERR! node App
- 2018-04-12 15:53:08Z npm ERR! npm bugs umbler-node
- 2018-04-12 15:53:08Z npm ERR! npm owner ls umbler-node
- 2018-04-12 15:53:08Z npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
- 2018-04-12 15:53:08Z npm ERR! code ELIFECYCLE
- 2018-04-12 15:53:08Z npm ERR! Exit status 1
- 2018-04-12 15:53:08Z npm ERR! Failed at the umbler-node@1.0.0 start script 'node App'.
- 2018-04-12 15:53:08Z npm ERR! If you do, this is most likely a problem with the umbler-node package,
- 2018-04-12 15:53:08Z npm ERR! Linux 4.4.0-116-generic
- 2018-04-12 15:53:08Z npm ERR! Make sure you have the latest version of node.js and npm installed.
- 2018-04-12 15:53:08Z npm ERR! node v6.11.3
- 2018-04-12 15:53:08Z npm ERR! not with npm itself.
- 2018-04-12 15:53:08Z npm ERR! npm v3.10.10
- 2018-04-12 15:53:08Z npm ERR! Or if that isn't available, you can get their info via:
- 2018-04-12 15:53:08Z npm ERR! Please include the following file with any support request:
- 2018-04-12 15:53:08Z npm ERR! Tell the author that this fails on your system:
- 2018-04-12 15:53:08Z npm ERR! There is likely additional logging output above.
- 2018-04-12 15:53:08Z npm ERR! umbler-node@1.0.0 start: `node App`
- 2018-04-12 15:53:08Z npm ERR! You can get information on how to open an issue for this project with:
- 2018-04-12 15:53:08Z npm info lifecycle umbler-node@1.0.0~start: Failed to exec start script
- 2018-04-12 15:53:08Z SyntaxError: missing ) after argument list
- 2018-04-12 15:53:08Z userSchema.pre('save', async function(next) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement