gesellix / keepass-node

KeePass2 editor for Node.js with a browser frontend
Apache License 2.0
81 stars 12 forks source link

Fails to run. #3

Closed TaylorWorthing closed 9 years ago

TaylorWorthing commented 9 years ago

After 'npm install', These errors come up in the output.

keepass.io@1.1.0 install /home/browncoat/keepass-node/node_modules/keepass.io (node-gyp rebuild 2>&1) || (echo 'DO NOT WORRY ABOUT THESE MESSAGES. KEEPASS.IO WILL FALLBACK TO SLOWER NODE.JS METHODS, SO THERE ARE NO LIMITATIONS EXCEPT SLOWER PERFORMANCE.'; exit 0)

make: Entering directory /home/browncoat/keepass-node/node_modules/keepass.io/build' CXX(target) Release/obj.target/kpion/native/kpion.o ../native/kpion.cc:11:28: fatal error: cryptopp/modes.h: No such file or directory compilation terminated. make: *** [Release/obj.target/kpion/native/kpion.o] Error 1 make: Leaving directory/home/browncoat/keepass-node/node_modules/keepass.io/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12) gyp ERR! System Linux 3.2.0-4-amd64 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/browncoat/keepass-node/node_modules/keepass.io gyp ERR! node -v v0.10.33 gyp ERR! node-gyp -v v1.0.1 gyp ERR! not ok DO NOT WORRY ABOUT THESE MESSAGES. KEEPASS.IO WILL FALLBACK TO SLOWER NODE.JS METHODS, SO THERE ARE NO LIMITATIONS EXCEPT SLOWER PERFORMANCE.

It says to not worry about the messages, so I moved on to start the package with 'npm start'. Here is the output.

fs.js:438 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ Error: ENOENT, no such file or directory '/home/browncoat/keepass-node/certs/your_private_key.pem' at Object.fs.openSync (fs.js:438:18) at Object.fs.readFileSync (fs.js:289:15) at Object. (/home/browncoat/keepass-node/keepass-node-config.js:8:17) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at /home/browncoat/keepass-node/server.js:4:16

npm ERR! keepass-node@0.0.1 start: node ./server.js npm ERR! Exit status 8 npm ERR! npm ERR! Failed at the keepass-node@0.0.1 start script. npm ERR! This is most likely a problem with the keepass-node package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./server.js npm ERR! You can get their info via: npm ERR! npm owner ls keepass-node npm ERR! There is likely additional logging output above. npm ERR! System Linux 3.2.0-4-amd64 npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! cwd /home/browncoat/keepass-node npm ERR! node -v v0.10.33 npm ERR! npm -v 1.4.28 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/browncoat/keepass-node/npm-debug.log npm ERR! not ok code 0

The mentioned npm-debug.log file shows basically the same output as above.

I am unsure if this is an issue with keepass-node or if it is an issue with my environment, but I can say that node and npm are working correctly for other packages.

gesellix commented 9 years ago

The first errors can be ignored, just as they say.

The second problem is due to a configuration problem. You need to edit the file /home/browncoat/keepass-node/keepass-node-config.js so that it either reads from existing certificate files or you may remove the lines completely and set the https.enabled flag to false. See this minimal example with disabled https support:

module.exports = {
  "port": 8443,
  "https": {
    "enabled": false
  },
  "basicAuth": {
    "enabled": false
  },
  "googleDrive": {
    "enabled": false
  }
};
TaylorWorthing commented 9 years ago

Using your barebones config does remove the error regarding the missing certificate. However, it is still failing to run, and is giving a new message.

/home/browncoat/keepass-node/keepass-node-config.js:7 "basicAuth": { ^ SyntaxError: Unexpected token : at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at /home/browncoat/keepass-node/server.js:4:16 at Object. (/home/browncoat/keepass-node/server.js:65:3) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10)

The rest of the npm error messages are the same regarding exit status and environment info.

gesellix commented 9 years ago

@TaylorWorthing could you please post your complete config file? now the error looks like some comma or bracket is missing.

gesellix commented 9 years ago

@TaylorWorthing like mentioned in the Installation readme it should also be enough to use this minimal config to only set the desired port:

module.exports = {
  "port": 8443
};
TaylorWorthing commented 9 years ago

Config is as follows

module.exports = {
  "port": 8443,
  "https": {
    "enabled": false,
    }
  },
  "basicAuth": {
    "enabled": false,
  },
  "googleDrive": {
    "enabled": false,
    },
  }
};

Using just the port setting and nothing else, it works.

gesellix commented 9 years ago

ah, well that's some invalid syntax with some commas and curly braces too much in this config. Please replace the config with exactly the content below. You can have a look at the differences online.

module.exports = {
  "port": 8443,
  "https": {
    "enabled": false
  },
  "basicAuth": {
    "enabled": false
  },
  "googleDrive": {
    "enabled": false
  }
};
gesellix commented 9 years ago

@TaylorWorthing did it work with the fixed syntax now?

TaylorWorthing commented 9 years ago

@gesellix Sorry for the delayed response, I had to start migrating servers. I tested the last config you gave me and it does indeed work. Thank you greatly. Just for clarity, when there is only one option (like "enabled": false), you need to remove the commas.

I did notice one other small issue, I don't know if it should be submitted as it's own issue. The entry view does not parse line breaks in the notes section. Is this something that can be fixed with particular formatting in the notes or is this a bug?

gesellix commented 9 years ago

@TaylorWorthing I would consider that as bug on my side. Could you please open a dedicated issue for that? I'm currently working on write support on another branch, so I could add a bugfix for the notes formatting on that branch quite quickly. It would help if you added an example of the notes content in the new issue. Thanks!