Closed DaiganIT closed 4 years ago
Managed to install using Node 10. I was previously using Node 12
Thanks, I'll take a look at the behavior on Node 12.
I can confirm that paseto.js cannot be build on Node 12.
I can propose two different fixes :
https://github.com/sloonz/paseto.js/tree/nan : Use https://github.com/nodejs/nan/ for extcrypto. Adds a dependency, but compatible with all nodes versions.
https://github.com/sloonz/paseto.js/tree/remove-ext-crypto : Get rid of extcrypto and do everyting with node crypto module. Unfortunately required APIs are only there from Node 11.
@sloonz - I have a bit of downtime in the coming weeks, and am trying to catch up on everything with this repo I've unfortunately been unable to deal with for a while. I'd happily merge in the nan
approach upstream here if you'd like to open a PR. I'd also be very willing to throw you a commit bit on this repo, as you seem to have developed your fork substantially.
Confirming it doesn't install on latest node LTS (12.14.0
as of time of writing) running on macOS Catalina (10.15.2).
error /Users/nfantone/Developer/flybondi/lambda-api-key-token-authorizer/node_modules/paseto.js: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/nfantone/Developer/flybondi/lambda-api-key-token-authorizer/node_modules/paseto.js
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@12.14.0 | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
# ...
5 warnings and 3 errors generated.
make: *** [Release/obj.target/extcrypto_addon/extcrypto/extcrypto.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node@12/12.14.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/usr/local/Cellar/node@12/12.14.0/bin/node" "/usr/local/Cellar/node@12/12.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /project/node_modules/paseto.js
Yep, I'll get Node 12 and 13 sorted by the end of the week.
Thanks @sjudson we appreciate that.
Closed by #26
Many thanks @sjudson!
Hi everyone, I'm running npm install -D paseto.js
First I was getting an error in node-gyp rebuild which brought me to python is missing
I have installed the windows-build-tools on node (npm install --global windows-build-tools) and now it appears the package is building but it spits out errors? ` PS C:\Users\Pietro\projects\x> npm install -D paseto.js
C:\Users\Pietro\projects\x\node_modules\paseto.js>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. extcrypto.cc win_delay_load_hook.cc c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(27): error C2660: 'v8::Function::Call': function does not take 3 arguments [C:\Users\Pietro\projects\x\node_modules\paseto.js\build\extcrypto_addon.vcxproj] c:\users\pietro.node-gyp\12.6.0\include\node\v8.h(4148): note: see declaration of 'v8::Function::Call' (compiling source file ..\extcrypto\extcrypto.cc) c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(35): error C2660: 'v8::Function::Call': function does not take 3 arguments [C:\Users\Pietro\projects\x\node_modules\paseto.js\build\extcrypto_addon.vcxproj] c:\users\pietro.node-gyp\12.6.0\include\node\v8.h(4148): note: see declaration of 'v8::Function::Call' (compiling source file ..\extcrypto\extcrypto.cc) c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(56): warning C4996: 'v8::String::NewFromUtf8': was declared deprecated [C:\Users\Pietro\projects\GameServices\FitXR .AdminPortal\node_modules\paseto.js\build\extcrypto_addon.vcxproj] c:\users\pietro.node-gyp\12.6.0\include\node\v8.h(2890): note: see declaration of 'v8::String::NewFromUtf8' c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(74): warning C4996: 'v8::String::NewFromUtf8': was declared deprecated [C:\Users\Pietro\projects\GameServices\FitXR .AdminPortal\node_modules\paseto.js\build\extcrypto_addon.vcxproj] c:\users\pietro.node-gyp\12.6.0\include\node\v8.h(2890): note: see declaration of 'v8::String::NewFromUtf8' c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(92): warning C4996: 'v8::String::NewFromUtf8': was declared deprecated [C:\Users\Pietro\projects\GameServices\FitXR .AdminPortal\node_modules\paseto.js\build\extcrypto_addon.vcxproj] c:\users\pietro.node-gyp\12.6.0\include\node\v8.h(2890): note: see declaration of 'v8::String::NewFromUtf8' c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(115): error C2664: 'v8::String::Utf8Value::Utf8Value(const v8::String::Utf8Value &)': cannot convert argument 1 fro m 'v8::Local' to 'const v8::String::Utf8Value &' [C:\Users\Pietro\projects\x\node_modules\paseto.js\build\extcrypto_addon.vcxproj]
c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(115): note: Reason: cannot convert from 'v8::Local' to 'const v8::String::Utf8Value'
c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(115): note: No user-defined-conversion operator available that can perform this conversion, or the operator canno
t be called
c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(130): warning C4996: 'v8::String::NewFromUtf8': was declared deprecated [C:\Users\Pietro\projects\GameServices\FitX
R.AdminPortal\node_modules\paseto.js\build\extcrypto_addon.vcxproj]
c:\users\pietro.node-gyp\12.6.0\include\node\v8.h(2890): note: see declaration of 'v8::String::NewFromUtf8'
c:\users\pietro\projects\x\node_modules\paseto.js\extcrypto\extcrypto.cc(147): warning C4996: 'v8::String::NewFromUtf8': was declared deprecated [C:\Users\Pietro\projects\GameServices\FitX
R.AdminPortal\node_modules\paseto.js\build\extcrypto_addon.vcxproj]
c:\users\pietro.node-gyp\12.6.0\include\node\v8.h(2890): note: see declaration of 'v8::String::NewFromUtf8'
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:203:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Windows_NT 10.0.17763 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\Pietro\projects\x\node_modules\paseto.js gyp ERR! node -v v12.6.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN rollback Rolling back readable-stream@2.3.6 failed (this is probably harmless): EPERM: operation not permitted, scandir 'C:\Users\Pietro\projects\x\node_modules\fsevents\node_modules' npm WARN bootstrap@4.3.1 requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself. npm WARN fitxradmin@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! paseto.js@0.1.3 install:
node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the paseto.js@0.1.3 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\Pietro\AppData\Roaming\npm-cache_logs\2019-07-11T15_18_06_113Z-debug.log `