Installation error on db configure
See original GitHub issueHi,
I’ve cloned the repository, but when I try to install it, I get an error with the bcrypt module:
npm ERR! Linux 2.6.32-642.13.1.el6.x86_64 npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install” npm ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! bcrypt@0.8.7 install:
node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@0.8.7 install script ‘node-gyp rebuild’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the bcrypt package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs bcrypt npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls bcrypt npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /opt/formio/npm-debug.log
I’ve switched from “bcrypt”: “^0.8.7”, to “bcryptjs”: “2.4.0” (I’ve googled the error and this apparently works). I have also changed all the references from bcrypt to bcryptjs in the code (src/authentication/index.js and src/util/encrypt.js). Now when I try the npm install
command, it works, but when I try to start the app, I get this:
node main
Checking for db install. No install found. Starting new install. Performing install. Install complete.
Checking for db schema updates. No updates found.
Initializing API Server. Mongo connection established. Installing… prompt: Are you sure you wish to install? (y/N): y
Which Github application would you like to install? 1.) None 2.) https://github.com/formio/formio-app-servicetracker 3.) https://github.com/formio/formio-app-todo 4.) https://github.com/formio/formio-app-salesquote 5.) https://github.com/formio/formio-app-basic
Or, you can provide a custom Github repository…
prompt: GitHub repository or selection?: (1) Importing template… { ValidationError: role validation failed at MongooseError.ValidationError (/opt/formio/node_modules/mongoose/lib/error/validation.js:23:11) at model.Document.invalidate (/opt/formio/node_modules/mongoose/lib/document.js:1499:32) at /opt/formio/node_modules/mongoose/lib/document.js:1375:17 at validate (/opt/formio/node_modules/mongoose/lib/schematype.js:705:7) at /opt/formio/node_modules/mongoose/lib/schematype.js:736:11 at /opt/formio/src/models/Role.js:53:16 at /opt/formio/node_modules/mongoose/lib/model.js:3419:16 at /opt/formio/node_modules/kareem/index.js:212:48 at /opt/formio/node_modules/kareem/index.js:127:16 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9) errors: { title: { ValidatorError: Role title must be unique. at MongooseError.ValidatorError (/opt/formio/node_modules/mongoose/lib/error/validator.js:24:11) at validate (/opt/formio/node_modules/mongoose/lib/schematype.js:704:13) at /opt/formio/node_modules/mongoose/lib/schematype.js:736:11 at /opt/formio/src/models/Role.js:53:16 at /opt/formio/node_modules/mongoose/lib/model.js:3419:16 at /opt/formio/node_modules/kareem/index.js:212:48 at /opt/formio/node_modules/kareem/index.js:127:16 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9) message: ‘Role title must be unique.’, name: ‘ValidatorError’, properties: [Object], kind: ‘user defined’, path: ‘title’, value: ‘Administrator’ } }, message: ‘role validation failed’, name: ‘ValidationError’ } role validation failed
And the process remains opened until I quit it with ctrl+c
.
Thanks for your support!
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
@mehrdadarvin @rmartinezvillar thanks for the feedback guys, I’ll try and check it out when I get a free minute. Sorry for the delay.
Having the same issue. Tried all the templates, dropping the db every time and no luck. Also, this error is showing up in mongod:
[conn20] assertion 10068 invalid operator: $eq ns:formioapp.roles query:{ _id: { $ne: ObjectId(‘588687ce9eb7a60cd4b05477’) }, deleted: { $eq: null }, title: “Administrator” }
[conn20] ntoskip:0 ntoreturn:-1