Closed NoeelMoeskops closed 6 years ago
Before installing
You MUST have a node-gyp global install before proceeding with install, along with GCC >= 4.8 / Clang >= 3.3.
node-argon2 works only and is tested against Node >=4.0.0.
Plus other stuff for Windows and OSX.
@jfurrow README needs to be updated. (Lacks of documentation again, I'm only telling that in order to highlight the importance fo #385).
@jfurrow The PR with argon2 should have needed a minor release (1.1.0) and a special note to update from 1.0.0.
I followed https://github.com/jfurrow/flood#updating + npm install -g node-gyp
before npm i
and check gcc.
I got this error:
sudo npm i shark@rawsec
> argon2@0.16.2 install /srv/flood/node_modules/argon2
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/usr/bin/python" is v3.6.3, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at PythonFinder.failPythonVersion (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack at ChildProcess.exithandler (child_process.js:264:7)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at maybeClose (internal/child_process.js:927:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:348:11)
gyp ERR! stack at emitOne (events.js:115:13)
gyp ERR! stack at Socket.emit (events.js:210:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:557:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /srv/flood/node_modules/argon2
gyp ERR! node -v v8.8.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! argon2@0.16.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the argon2@0.16.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-11-11T17_33_10_314Z-debug.log
Because on archlinux default python is python3 and gyp need python2. The solution on arch is sudo pacman -S python2
and then sudo npm i --python="/usr/bin/python2" --unsafe-perm
(see here for why --unsafe-perm
) .
@jfurrow see PR #532
One more thing: flag "--production" is not supported right now. You will get errors on "npm run build" stage. Do it like README says: "npm install" and "npm run build".
Thanks for your reply's. I installed gcc, clang and node-gyp. But my instalation still has errors:
╭─noeel@fedora.localdomain /opt/flood ‹master*›
╰─➤ sudo npm install -g node-gyp
/usr/bin/node-gyp -> /usr/lib/node_modules/node-gyp/bin/node-gyp.js
/usr/lib
└── node-gyp@3.6.2
╭─noeel@fedora.localdomain /opt/flood ‹master*›
╰─➤ npm install argon2
> argon2@0.16.2 install /opt/flood/node_modules/argon2
> node-gyp rebuild
make: Entering directory '/opt/flood/node_modules/argon2/build'
CC(target) Release/obj.target/libargon2/argon2/src/opt.o
CC(target) Release/obj.target/libargon2/argon2/src/argon2.o
CC(target) Release/obj.target/libargon2/argon2/src/core.o
CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o
CC(target) Release/obj.target/libargon2/argon2/src/thread.o
CC(target) Release/obj.target/libargon2/argon2/src/encoding.o
AR(target) Release/obj.target/argon2.a
COPY Release/argon2.a
CXX(target) Release/obj.target/argon2/src/argon2_node.o
In file included from ../../nan/nan.h:192:0,
from ../src/argon2_node.h:5,
from ../src/argon2_node.cpp:8:
../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../../nan/nan_maybe_43_inl.h:112:73: warning: ‘v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated: Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
In file included from /home/noeel/.node-gyp/9.1.0/include/node/v8.h:26:0,
from /home/noeel/.node-gyp/9.1.0/include/node/node.h:63,
from ../src/argon2_node.cpp:1:
/home/noeel/.node-gyp/9.1.0/include/node/v8.h:3115:29: note: declared here
Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
^
/home/noeel/.node-gyp/9.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/argon2.node
COPY Release/argon2.node
make: Leaving directory '/opt/flood/node_modules/argon2/build'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ argon2@0.16.2
added 117 packages in 121.63s
╭─noeel@fedora.localdomain /opt/flood ‹master*›
╰─➤ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 115 packages in 95.57s
╭─noeel@fedora.localdomain /opt/flood ‹master*›
╰─➤ npm run build
> flood@1.0.0 build /opt/flood
> node client/scripts/build.js
Creating an optimized production build...
Failed to compile.
./client/src/sass/style.scss
Module build failed: Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (59)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.5.3
./client/src/sass/style.scss
Module build failed: ModuleBuildError: Module build failed: Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (59)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.5.3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! flood@1.0.0 build: `node client/scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the flood@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/noeel/.npm/_logs/2017-11-12T16_42_03_013Z-debug.log
╭─noeel@fedora.localdomain /opt/flood ‹master*›
╰─➤ npm start 1 ↵
> flood@1.0.0 start /opt/flood
> node server/bin/start.js
Failed to start web server:
Error: Cannot find module '/opt/flood/node_modules/bcrypt/lib/binding/bcrypt_lib.node'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! flood@1.0.0 start: `node server/bin/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the flood@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/noeel/.npm/_logs/2017-11-12T16_42_33_451Z-debug.log
@Noedel-Man
1) You don't need two C compiler (gcc and clang): just one is enough. For example keep gcc and uninstall clang.
2) If install fails why do you try to start flood anyway?
3) Is your gcc > 4.8? (gcc --version
)
4) For npm run build
see issue #533
@Noedel-Man Please, start over from the beginning and do exactly what the README says. You may want to close this issue and open a new one if you encounter problems in your next install.
Thanks @noraj1337!
@Noedel-Man Please follow @noraj1337's advice.
Here's my fix for this issue:
I had a similar issue, eventually after making sure I had the following packages installed it worked:
sudo apt install g++ argon2 gcc make
OS: Fedora 26, tried node 6, 7 and 9