Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argon2 seems to be a show stopper #8

Closed
JLKM opened this issue Aug 23, 2017 · 5 comments
Closed

Argon2 seems to be a show stopper #8

JLKM opened this issue Aug 23, 2017 · 5 comments
Labels

Comments

@JLKM
Copy link

JLKM commented Aug 23, 2017

I was looking forward to testing this awesome library due to its combination of MongoDB, Express, Nuxt and even SSR. But I'm not able to get i up and running on my setup, which is:

  • Windows 10
  • VScode 64-bit, which also runs my terminal
  • Node 8.1.2
  • MongoDB 3.4.7 - both with and without mongod running

Some suspects:

  • argon2 was missing (did a npm install --save argon2 but install didn't work)
  • missing python

Does Argon2 simply not run on Windows:
ranisalt/node-argon2#34

I'll leave the full log to you - and hope the best:

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS F:\frontend\vue\fullstack> vue init rlindskog/vueniverse vueniverse

? Project name vueniverse
? Project description Første test med init
? Author Jan Larsen
? Choose a session strategy (for blacklisting JWTs) in-memory

   vue-cli · Generated "vueniverse".

   To get started:

     cd vueniverse
     npm install
     npm run start-db
     npm run dev

   Documentation can be found at https://www.github.com/rlindskog/vueniverse

PS F:\frontend\vue\fullstack> cd vueniverse
PS F:\frontend\vue\fullstack\vueniverse> npm install
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

> argon2@0.16.1 install F:\frontend\vue\fullstack\vueniverse\node_modules\argon2
> node-gyp rebuild


F:\frontend\vue\fullstack\vueniverse\node_modules\argon2>if not defined npm_config_node_gyp (node "C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\n
ode-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Jan\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd F:\frontend\vue\fullstack\vueniverse\node_modules\argon2
gyp ERR! node -v v8.1.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN ajv-keywords@2.1.0 requires a peer of ajv@>=5.0.0 but none was installed.
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":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! argon2@0.16.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the argon2@0.16.1 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!     C:\Users\Jan\AppData\Roaming\npm-cache\_logs\2017-08-23T18_11_00_575Z-debug.log
PS F:\frontend\vue\fullstack\vueniverse> node -v
v8.1.2
PS F:\frontend\vue\fullstack\vueniverse> npm install --save argon2

> argon2@0.16.1 install F:\frontend\vue\fullstack\vueniverse\node_modules\argon2
> node-gyp rebuild


F:\frontend\vue\fullstack\vueniverse\node_modules\argon2>if not defined npm_config_node_gyp (node "C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\n
ode-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Jan\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd F:\frontend\vue\fullstack\vueniverse\node_modules\argon2
gyp ERR! node -v v8.1.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN ajv-keywords@2.1.0 requires a peer of ajv@>=5.0.0 but none was installed.
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":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! argon2@0.16.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the argon2@0.16.1 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!     C:\Users\Jan\AppData\Roaming\npm-cache\_logs\2017-08-23T18_18_36_164Z-debug.log
PS F:\frontend\vue\fullstack\vueniverse> npm install

> argon2@0.16.1 install F:\frontend\vue\fullstack\vueniverse\node_modules\argon2
> node-gyp rebuild


F:\frontend\vue\fullstack\vueniverse\node_modules\argon2>if not defined npm_config_node_gyp (node "C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\n
ode-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Jan\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd F:\frontend\vue\fullstack\vueniverse\node_modules\argon2
gyp ERR! node -v v8.1.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN ajv-keywords@2.1.0 requires a peer of ajv@>=5.0.0 but none was installed.
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":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! argon2@0.16.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the argon2@0.16.1 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!     C:\Users\Jan\AppData\Roaming\npm-cache\_logs\2017-08-23T18_18_59_462Z-debug.log
PS F:\frontend\vue\fullstack\vueniverse> npm run start-db

> vueniverse@0.0.1 start-db F:\frontend\vue\fullstack\vueniverse
> mongod --fork --dbpath ./db/data --logpath ./db/logs/mongodb.log

Error parsing command line: unrecognised option '--fork'
try 'mongod --help' for more information
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! vueniverse@0.0.1 start-db: `mongod --fork --dbpath ./db/data --logpath ./db/logs/mongodb.log`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the vueniverse@0.0.1 start-db 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!     C:\Users\Jan\AppData\Roaming\npm-cache\_logs\2017-08-23T18_20_00_201Z-debug.log
PS F:\frontend\vue\fullstack\vueniverse> npm run dev

> vueniverse@0.0.1 dev F:\frontend\vue\fullstack\vueniverse
> backpack dev



 ERROR  Failed to compile with 2 errors                                                                                                                                                         20:20:51

This dependency was not found:

* argon2 in ./src/server/api/users/controllers.js, ./src/server/api/users/models.js

To install it, you can run: npm install --save argon2
module.js:487
    throw err;
    ^

Error: Cannot find module 'F:\frontend\vue\fullstack\vueniverse\dist\server\main.js'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Terminate batch job (Y/N)? y
PS F:\frontend\vue\fullstack\vueniverse> npm install --save argon2

> argon2@0.16.1 install F:\frontend\vue\fullstack\vueniverse\node_modules\argon2
> node-gyp rebuild


F:\frontend\vue\fullstack\vueniverse\node_modules\argon2>if not defined npm_config_node_gyp (node "C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\n
ode-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\Jan\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Jan\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd F:\frontend\vue\fullstack\vueniverse\node_modules\argon2
gyp ERR! node -v v8.1.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN ajv-keywords@2.1.0 requires a peer of ajv@>=5.0.0 but none was installed.
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":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! argon2@0.16.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the argon2@0.16.1 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!     C:\Users\Jan\AppData\Roaming\npm-cache\_logs\2017-08-23T18_24_00_512Z-debug.log
PS F:\frontend\vue\fullstack\vueniverse>
@rlindskog
Copy link
Owner

Sorry, I'm not on windows. I'll look at this in a bit, but in the mean time, I'd check out bcrypt as a possible alternative to password hashing.

@rlindskog rlindskog added the bug label Aug 23, 2017
@JLKM
Copy link
Author

JLKM commented Aug 24, 2017

Argon2 also won't install on Ubuntu 16.04 LTS with node 8.4.0/npm 5.3.0, so I'll have to continue looking out. This is a real pity, since you've hit the right stack with MongoDB/Express/Nuxt incl. SSR.

root@jlkm:/var/www/node# cd vueniversetest
root@jlkm:/var/www/node/vueniversetest# npm install

> argon2@0.16.1 install /var/www/node/vueniversetest/node_modules/argon2
> node-gyp rebuild

gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.4.0-92-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/node/vueniversetest/node_modules/argon2
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN ajv-keywords@2.1.0 requires a peer of ajv@>=5.0.0 but none was installed.
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.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the argon2@0.16.1 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-08-24T07_19_20_285Z-debug.log
root@jlkm:/var/www/node/vueniversetest#

@takotuesday
Copy link

Im running into the exact same issue on Windows 10. Any update would be awesome

@rlindskog
Copy link
Owner

Updated the password hashing solution to bcryptjs, which is written in pure JavaScript. Should work fine for Windows out of the box. Let me know if you have any more problems.

@ATakaSKY
Copy link

ATakaSKY commented Mar 9, 2018

One solution that I came across, install below tools:
npm install --global --production windows-build-tools
nfroidure/ttf2woff2#28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants