gevorg / apache-crypt Goto Github PK
View Code? Open in Web Editor NEWNode.js module for Apache style password encryption using crypt(3).
License: MIT License
Node.js module for Apache style password encryption using crypt(3).
License: MIT License
[email protected] test /home/nodebot/test/node_modules/apache-crypt
node ./node_modules/nodeunit/bin/nodeunit tests
Assertion failed: Typed arrays 2 must be run on a little-endian system
Assertion failed: Typed arrays 2 must be run on a little-endian system
TAP version 13
1..0
/home/nodebot/test/node_modules/apache-crypt/lib/libcrypt.js:1
orts, require, module, __filename, __dirname) { function f(a){throw a;}var h=v
^
abort() at Error
at Error ()
Is it possible to support big-endian system?
This module always gives me problem when I install it, for example:
make: Entering directory '/usr/lib/nvm/v0.11.14/lib/node_modules/http-master/node_modules/http-auth/node_modules/htpasswd/node_modules/apache-crypt/build'
CXX(target) Release/obj.target/crypt3/deps/crypt3.o
../deps/crypt3.cc: In function ‘const char* GetApacheSalt()’:
../deps/crypt3.cc:18:20: error: ‘time’ was not declared in this scope
srand(time(NULL));
^
../deps/crypt3.cc: At global scope:
../deps/crypt3.cc:28:28: error: ‘Arguments’ does not name a type
Handle<Value> Method(const Arguments& args) {
^
In file included from /usr/lib/nvm/v0.11.14/lib/node_modules/http-master/node_modules/http-auth/node_modules/htpasswd/node_modules/apache-crypt/.node-gyp/0.11.14/src/node.h:61:0,
from ../deps/crypt3.cc:3:
The code is so simple it could be rewritten to JS.
OS: Raspbian jessie
Board: Raspberry pi 3
node : node v6.3.0
while installing apache-crypt using command npm install apache-crypt
received following error.
./node_modules/nan/nan.h:1994:23: error: 'ExternalAsciiStringResource' in 'class v8::String' does not name a type
const v8::String::ExternalAsciiStringResource* ext;
^
../node_modules/nan/nan.h:1995:5: error: 'ext' was not declared in this scope
ext = str->GetExternalAsciiStringResource();
^
../node_modules/nan/nan.h:1995:16: error: 'class v8::String' has no member named 'GetExternalAsciiStringResource'
ext = str->GetExternalAsciiStringResource();
^
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/node/armv7l/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.4.22-v7+
gyp ERR! command "/opt/node/armv7l/bin/node" "/opt/node/armv7l/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/proj/node_modules/apache-crypt
gyp ERR! node -v v6.3.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: node-gyp rebuild
npm WARN install:[email protected] Exit status 1
apache-crypt 1.0.4 does not build for me on OS X Mavericks v10.9.2:
$ npm install apache-crypt
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/apache-crypt
npm http 200 https://registry.npmjs.org/apache-crypt
> [email protected] install /path/to/node_modules/apache-crypt
> node-gyp rebuild
2014-04-08 05:24:16.077 xcodebuild[83630:1007] [MT] PluginLoading: Required plug-in compatibility UUID A2E4D43F-41F4-4FB9-BB94-7177011C9AED for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs
CXX(target) Release/obj.target/crypt3/deps/crypt3.o
../deps/crypt3.cc:18:11: error: use of undeclared identifier 'time'
srand(time(NULL));
^
../deps/crypt3.cc:28:28: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> Method(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/rschmidt/.node-gyp/0.11.12/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../deps/crypt3.cc:29:14: error: calling a private constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/rschmidt/.node-gyp/0.11.12/deps/v8/include/v8.h:768:13: note: declared private here
V8_INLINE HandleScope() {}
^
../deps/crypt3.cc:31:13: error: member access into incomplete type 'const v8::internal::Arguments'
if (args.Length() == 0) {
^
/Users/rschmidt/.node-gyp/0.11.12/deps/v8/include/v8.h:141:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
^
../deps/crypt3.cc:36:14: error: type 'const v8::internal::Arguments' does not provide a subscript operator
if (!args[0]->IsString() || (args.Length() > 1 && !args[1]->IsString())) {
~~~~^~
../deps/crypt3.cc:36:38: error: member access into incomplete type 'const v8::internal::Arguments'
if (!args[0]->IsString() || (args.Length() > 1 && !args[1]->IsString())) {
^
/Users/rschmidt/.node-gyp/0.11.12/deps/v8/include/v8.h:141:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
^
../deps/crypt3.cc:42:40: error: type 'const v8::internal::Arguments' does not provide a subscript operator
v8::String::Utf8Value password(args[0]->ToString());
~~~~^~
../deps/crypt3.cc:43:36: error: member access into incomplete type 'const v8::internal::Arguments'
v8::String::Utf8Value salt(args.Length() > 1 ? args[1]->ToString() : String::New(GetApacheSalt()));
^
/Users/rschmidt/.node-gyp/0.11.12/deps/v8/include/v8.h:141:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
^
../deps/crypt3.cc:50:65: error: cannot initialize a parameter of type 'FunctionCallback' (aka 'void (*)(const
FunctionCallbackInfo<v8::Value> &)') with an lvalue of type 'Handle<v8::Value>
(const v8::internal::Arguments &)': type mismatch at 1st parameter ('const FunctionCallbackInfo<v8::Value> &'
vs 'const v8::internal::Arguments &')
exports->Set(String::NewSymbol("crypt"), FunctionTemplate::New(Method)->GetFunction());
^~~~~~
/Users/rschmidt/.node-gyp/0.11.12/deps/v8/include/v8.h:3347:24: note: passing argument to parameter 'callback' here
FunctionCallback callback = 0,
^
9 errors generated.
make: *** [Release/obj.target/crypt3/deps/crypt3.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1045:12)
gyp ERR! System Darwin 13.1.0
gyp ERR! command "node" "/opt/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /path/to/node_modules/apache-crypt
gyp ERR! node -v v0.11.12
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the apache-crypt 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 their info via:
npm ERR! npm owner ls apache-crypt
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.1.0
npm ERR! command "/opt/local/bin/node" "/opt/local/bin/npm" "install" "apache-crypt"
npm ERR! cwd /path/to
npm ERR! node -v v0.11.12
npm ERR! npm -v 1.4.6
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /path/to/npm-debug.log
npm ERR! not ok code 0
all I get is an error when I try to install the module. Tried to install http-auth which requires apache-crypt and so stumbled into this. Here's the error part of the npm-debug.log. The full log is too long to be posted here. Hope this helps you to fix this.
regards,
Thomas
759 verbose C:\Users\Tom\AppData\Roaming\npm\node_modules\http-auth\node_modules.bin,[object Object] binRoot
760 info postuninstall [email protected]
761 verbose about to build C:\Users\Tom\AppData\Roaming\npm\node_modules\http-auth
762 info C:\Users\Tom\AppData\Roaming\npm\node_modules\http-auth unbuild
763 info preuninstall [email protected]
764 info uninstall [email protected]
765 verbose true,C:\Users\Tom\AppData\Roaming\npm\node_modules,C:\Users\Tom\AppData\Roaming\npm\node_modules unbuild [email protected]
766 info postuninstall [email protected]
767 error [email protected] install: node-gyp rebuild
767 error Exit status 1
768 error Failed at the [email protected] install script.
768 error This is most likely a problem with the apache-crypt package,
768 error not with npm itself.
768 error Tell the author that this fails on your system:
768 error node-gyp rebuild
768 error You can get their info via:
768 error npm owner ls apache-crypt
768 error There is likely additional logging output above.
769 error System Windows_NT 6.1.7601
770 error command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "http-auth"
771 error cwd C:\brainshop\server
772 error node -v v0.10.24
773 error npm -v 1.3.21
774 error code ELIFECYCLE
775 verbose exit [ 1, true ]
https://github.com/rvagg/nan should be utilized to achieve this goal.
Would you accept a pull request for this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.