kimmobrunfeldt / git-hours

Estimate time spent on a git repository
MIT License
774 stars 59 forks source link

Does not install with Node 18.x #79

Open fakoua opened 11 months ago

fakoua commented 11 months ago
npm install -g git-hours
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'git-hours@1.5.0',
npm WARN EBADENGINE   required: { node: '^14.x' },
npm WARN EBADENGINE   current: { node: 'v18.15.0', npm: '9.2.0' }
npm WARN EBADENGINE }
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     ' **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir ' **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit\vendor\libgit2\tests\resources\typechanges\.gitted\modules'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: ' **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours\\node_modules\\nodegit\\vendor\\libgit2\\tests\\resources\\typechanges\\.gitted\\modules'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     ' **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir ' **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit\vendor\libgit2\tests\resources\typechanges'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: ' **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours\\node_modules\\nodegit\\vendor\\libgit2\\tests\\resources\\typechanges'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     ' **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours\\node_modules\\nodegit',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir ' **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit\vendor\libgit2\tests\resources\submod2\.gitted\modules\sm_unchanged\logs'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: ' **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours\\node_modules\\nodegit\\vendor\\libgit2\\tests\\resources\\submod2\\.gitted\\modules\\sm_unchanged\\logs'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     ' **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours\\node_modules',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir ' **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit\vendor\libgit2\tests\resources\push_src\.gitted\modules'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: ' **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours\\node_modules\\nodegit\\vendor\\libgit2\\tests\\resources\\push_src\\.gitted\\modules'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path  **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node lifecycleScripts/preinstall && node lifecycleScripts/install
npm ERR! [nodegit] Running pre-install script
npm ERR! [nodegit] Running install script
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe  **HIDDEN**\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module= **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit\build\Release\nodegit.node --module_name=nodegit --module_path= **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp
npm ERR! info it worked if it ends with ok
npm ERR! node-pre-gyp info
npm ERR! using node-pre-gyp@0.13.0
npm ERR! node-pre-gyp info using node@18.15.0 | win32 | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info
npm ERR! check checked for " **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit\build\Release\nodegit.node" (not found)
npm ERR! node-pre-gyp
npm ERR! http GET https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v108-win32-x64.tar.gz
npm ERR! node-pre-gyp http 404 https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v108-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v108-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for nodegit@0.27.0 and node@18.15.0 (node-v108 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v108-win32-x64.tar.gz
npm ERR! gyp
npm ERR! info it worked if it ends with ok
npm ERR! gyp info using
npm ERR! node-gyp@9.3.0
npm ERR! gyp info using node@18.15.0 | win32 | x64
npm ERR! gyp
npm ERR! info
npm ERR! ok
npm ERR!
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using
npm ERR! node-gyp@9.3.0
npm ERR! gyp info using node@18.15.0 | win32 | x64
npm ERR! gyp
npm ERR! info find Python using Python version 3.10.11 found at " **HIDDEN**\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe"
npm ERR! gyp ERR!
npm ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2022 (17.1.32328.378) found at:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp
npm ERR! ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS
npm ERR! not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp
npm ERR! ERR! find VS **************************************************************
npm ERR! gyp ERR!
npm ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp
npm ERR! ERR! find VS For more information consult the documentation at:
npm ERR! gyp
npm ERR! ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp
npm ERR! ERR! find VS **************************************************************
npm ERR! gyp
npm ERR! ERR! find VS
npm ERR! gyp
npm ERR! ERR! configure error
npm ERR! gyp
npm ERR! ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR!
npm ERR! stack     at VisualStudioFinder.fail ( **HIDDEN**\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR!
npm ERR! stack     at  **HIDDEN**\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR!
npm ERR! stack     at VisualStudioFinder.findVisualStudio2013 ( **HIDDEN**\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:369:14)
npm ERR! gyp ERR! stack
npm ERR! at  **HIDDEN**\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack     at  **HIDDEN**\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:390:16
npm ERR! gyp ERR! stack     at  **HIDDEN**\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack     at  **HIDDEN**\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:427:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
npm ERR! gyp ERR! System Windows_NT 10.0.26016
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" " **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module= **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours\\node_modules\\nodegit\\build\\Release\\nodegit.node" "--module_name=nodegit" "--module_path= **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours\\node_modules\\nodegit\\build\\Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm ERR! gyp ERR! cwd  **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit
npm ERR! gyp ERR! node -v v18.15.0
npm ERR! gyp
npm ERR! ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR!
npm ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe  **HIDDEN**\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module= **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit\build\Release\nodegit.node --module_name=nodegit --module_path= **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> ( **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.26016
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" " **HIDDEN**\\AppData\\Roaming\\npm\\node_modules\\git-hours\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp
npm ERR! ERR! cwd  **HIDDEN**\AppData\Roaming\npm\node_modules\git-hours\node_modules\nodegit
npm ERR! node-pre-gyp ERR!
npm ERR! node -v v18.15.0
npm ERR! node-pre-gyp ERR!
npm ERR! node-pre-gyp -v v0.13.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! [nodegit] ERROR - Could not finish install
npm ERR! [nodegit] ERROR - finished with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!      **HIDDEN**\AppData\Local\npm-cache\_logs\2023-12-29T04_08_05_068Z-debug-0.log
robert-stanciu commented 4 months ago

If you have Docker installed, you can spin up a node 16 container and install this package in it (if you don't want to pollute your machine with older versions of node).

run this docker command in your repo root. docker run -it --name my-node16-container -v .:/app node:16 /bin/bash npm i git-hours -g cd app && git-hours

grantcko commented 4 months ago

I am dealing with this issue. Haven't tried using older node versions tho. Just wanted to add my error message too in case it gives developers any more info.

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'git-hours@1.5.0',
npm warn EBADENGINE   required: { node: '^14.x' },
npm warn EBADENGINE   current: { node: 'v20.15.1', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated npmlog@4.1.2: This package is no longer supported.
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated gauge@2.7.4: This package is no longer supported.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future