Closed EyalSinay closed 1 year ago
hi, even I am facing the same issue. can you help me with how to resolve this issue, please? I have been searching for an answer for the past 10 days I am not able to find any solution. please help me if anyone as any solution to this problem
Your error tells me that it was a problem building node-gl, one of the dependencies. The package could be pulling an outdated version. You could always clone the repo locally, change package.json and try doing a local npm install to see if it fixes it. Here's a little shell function I use to change versions quickly:
change_packagejs_version() {
[ -f package.json ] || return 1
local package="\"$1\""
local new_version="\"$2\""
local old_version="\"[^\"]*\""
local ws="\s*"
local search_expr="$package$ws:$ws$old_version"
local replace_expr="$package: $new_version"
sed -i package.json -e "s/$search_expr/$replace_expr/g"
}
Or a powershell version since that seems to be what you're using:
function Change-PackageJS-Version($package, $version, [Boolean]$print=$false) {
If (!(Test-Path -Path package.json -PathType Leaf)) {
return
}
set packageQuoted ('"' + $package + '"')
set oldVersion '"[^"]*"'
set newVersion ('"' + $version + '"')
set ws '\s*'
set searchExpr "$packageQuoted${ws}:$ws$oldVersion"
set replaceExpr "${packageQuoted}: $newVersion"
set content ((Get-Content -Path package.json) -Replace "$searchExpr", "$replaceExpr")
If ($Print -Eq $false) {
Set-Content -Path ./package.json -Value $content
} Else {
Write-Output $content
}
}
Then you'd use them like so:
$ git clone https://github.com/transitive-bullshit/ffmpeg-concat
$ cd ffmpeg-concat
$ change_packagejs_version gl '*'
$ npm install -g
$ ffmpeg-concat --version
PS> git clone 'https://github.com/transitive-bullshit/ffmpeg-concat'
PS> cd ffmpeg-concat
PS> Change-PackageJS-Version gl '*'
PS> npm install -g
PS> ffmpeg-concat --version
Honestly in my case I just updated all packages to latest and then fixed errors as they came, so I don't know what the minimum working versions are, but keep trying and I am sure you'll succeed, meow.
Did this solution work for you @EyalSinay I am facing an issue with
Error: Cannot find module 'commander'
I tried install the commander, some other issues were coming up please help @fcard
I didn't try because i already build my project with fluent-ffmp
I am still not able to install the package :(
@vineethvijayan314 I was working on updating the deps and changing the repo to the ES5 module system so I could send a PR or smth, but got distracted by other things.
But here's how I managed to fix it:
$ change_packagejs_version gl '*'
$ change_packagejs_version sharp '*'
$ npm audit fix # this takes a while, don't close/interrupt
$ npm install -g
$ ffmpeg-concat --version
There's still some bugs, which I don't know if they were there before the bit rot or not, but I managed to cat some files.
PS C:\Users\eyal.vscode\project\concat-videos> npm i ffmpeg-concat
npm ERR! sys.exit(gyp.script_main())
npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\pylib\gyp__init.py", line 670, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\pylib\gyp__init.py", line 662, in main
npm ERR! return gyp_main(args)
npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\pylib\gyp\init__.py", line 629, in gyp_main
npm ERR! [generator, flat_list, targets, data] = Load(
npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\pylib\gyp\init__.py", line 150, in Load
npm ERR! result = gyp.input.Load(
npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 3021, in Load
npm ERR! LoadTargetBuildFile(
npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 411, in LoadTargetBuildFile
npm ERR! build_file_data = LoadOneBuildFile(
npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 266, in LoadOneBuildFile
npm ERR! LoadBuildFileIncludesIntoDict(
npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 310, in LoadBuildFileIncludesIntoDict
npm ERR! LoadOneBuildFile(include, data, aux_data, None, False, check),
npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 239, in LoadOneBuildFile
npm ERR! build_file_contents = open(build_file_path, "rU").read()
npm ERR! File "C:\Python310\lib\encodings\cp1255.py", line 23, in decode
npm ERR! return codecs.charmap_decode(input,self.errors,decoding_table)[0]
npm ERR! UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 12965: character maps to
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error:
npm WARN config global
--global
,--local
are deprecated. Use--location=global
instead. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() 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 ERR! code 1 npm ERR! path C:\Users\eyal.vscode\project\concat-videos\node_modules\gl npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@16.15.1 | win32 | x64 npm ERR! gyp info find Python using Python version 3.10.5 found at "C:\Python310\python.exe" npm ERR! gyp info find VS using VS2019 (16.11.32126.315) found at: npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! (node:40520) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. npm ERR! (Usenode --trace-deprecation ...
to show where the warning was created) npm ERR! gyp info spawn C:\Python310\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Users\eyal\.vscode\project\concat-videos\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\eyal\.vscode\project\concat-videos\node_modules\gl\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\eyal\.vscode\project\concat-videos\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\eyal\AppData\Local\node-gyp\Cache\16.15.1\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\eyal\AppData\Local\node-gyp\Cache\16.15.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\eyal\.vscode\project\concat-videos\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\eyal\\AppData\\Local\\node-gyp\\Cache\\16.15.1\\<(target_arch)\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\eyal\.vscode\project\concat-videos\node_modules\gl', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'C:\Users\eyal\.vscode\project\concat-videos\node_modules\gl\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! Traceback (most recent call last): npm ERR! File "C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\gyp\gyp_main.py", line 51, ingyp
failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\eyal.vscode\project\concat-videos\node_modules\node-gyp\lib\configure.js:351:16) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Windows_NT 10.0.22000 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\eyal\.vscode\project\concat-videos\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd C:\Users\eyal.vscode\project\concat-videos\node_modules\gl npm ERR! gyp ERR! node -v v16.15.1 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not oknpm ERR! A complete log of this run can be found in: npm ERR! C:\Users\eyal\AppData\Local\npm-cache_logs\2022-06-21T17_41_46_295Z-debug-0.log