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

Cant set it up/Error #3

Open
xNoobkey opened this issue Sep 6, 2024 · 4 comments
Open

Cant set it up/Error #3

xNoobkey opened this issue Sep 6, 2024 · 4 comments

Comments

@xNoobkey
Copy link

xNoobkey commented Sep 6, 2024

Im on windows 11 i have downloaded python3.12.5,vs build tools. This is what it says

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 @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated left-pad@1.3.0: use String.prototype.padStart()
npm warn deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated gauge@3.0.2: This package 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 request/request#3142
npm warn deprecated superagent@6.1.0: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See ladjs/superagent#1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net
npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup 'C:\Users\User1\Desktop\auto-shorts\node_modules\inkpaint',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\User1\Desktop\auto-shorts\node_modules\inkpaint\lib\renderers'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'C:\Users\User1\Desktop\auto-shorts\node_modules\inkpaint\lib\renderers'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error code 1
npm error path C:\Users\User1\Desktop\auto-shorts\node_modules\gl
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild
npm error prebuild-install warn install No prebuilt binaries found (target=20.17.0 runtime=node arch=x64 libc= platform=win32)
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@9.4.1
npm error gyp info using node@20.17.0 | win32 | x64
npm error gyp info find Python using Python version 3.12.5 found at "C:\Users\User1\AppData\Local\Programs\Python\Python312\python.exe"
npm error gyp info find VS using VS2022 (17.11.35222.181) found at:
npm error gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"
npm error gyp info find VS run with --verbose for detailed information
npm error gyp info spawn C:\Users\User1\AppData\Local\Programs\Python\Python312\python.exe
npm error gyp info spawn args [
npm error gyp info spawn args 'C:\Users\User1\Desktop\auto-shorts\node_modules\node-gyp\gyp\gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'msvs',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\Users\User1\Desktop\auto-shorts\node_modules\gl\build\config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\Users\User1\Desktop\auto-shorts\node_modules\node-gyp\addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\Users\User1\AppData\Local\node-gyp\Cache\20.17.0\include\node\common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=C:\Users\User1\AppData\Local\node-gyp\Cache\20.17.0',
npm error gyp info spawn args '-Dnode_gyp_dir=C:\Users\User1\Desktop\auto-shorts\node_modules\node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=C:\\Users\\User1\\AppData\\Local\\node-gyp\\Cache\\20.17.0\\<(target_arch)\\node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=C:\Users\User1\Desktop\auto-shorts\node_modules\gl',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'C:\Users\User1\Desktop\auto-shorts\node_modules\gl\build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error Traceback (most recent call last):
npm error File "C:\Users\User1\Desktop\auto-shorts\node_modules\node-gyp\gyp\gyp_main.py", line 42, in
npm error import gyp # noqa: E402
npm error ^^^^^^^^^^
npm error File "C:\Users\User1\Desktop\auto-shorts\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 9, in
npm error import gyp.input
npm error File "C:\Users\User1\Desktop\auto-shorts\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 19, in
npm error from distutils.version import StrictVersion
npm error ModuleNotFoundError: No module named 'distutils'
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: gyp failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.onCpExit (C:\Users\User1\Desktop\auto-shorts\node_modules\node-gyp\lib\configure.js:325:16)
npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm error gyp ERR! System Windows_NT 10.0.22631
npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\User1\Desktop\auto-shorts\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm error gyp ERR! cwd C:\Users\User1\Desktop\auto-shorts\node_modules\gl
npm error gyp ERR! node -v v20.17.0
npm error gyp ERR! node-gyp -v v9.4.1
npm error gyp ERR! not ok

@alamshafil
Copy link
Owner

Before I start, I would like to apologize for the late message. I have been working on a new version (tentatively v0.2.0) with solving your issue in mind. This NPM package relies on a native packages to render the videos. The native packages are canvas gl and whisper-node.

After reading your log, it looks like the native package gl failed to build due to a Python issue. The error states that Python could not find the package distutils.

Open your terminal or CMD and type this command:

pip install setuptools

This will install the needed package for npm to build gl. This should fix your error. If you have any more errors, which may happen, then feel free to post them here.

Also, if you can, try updating your Node.js version to the latest version or latest LTS version and try running npm install in a fresh environment.

Thank for you time and interest in this project. Once again I apologize for the late message.

@xNoobkey
Copy link
Author

Thanks, no problem for the delay

@xNoobkey
Copy link
Author

I dont know where to put api maybe thats the problem, can you help me?

PS C:\Users\User1\Desktop\auto-shorts-0.1.1> npx auto-shorts
ℹ Welcome to AutoShorts AI video generator v0.1.0-dev!
ℹ [*] Resource path not found (--resPath). Using 'res' directory.

--> Current options:
ℹ AI Type: OllamaAIGen
ℹ TTS Type: BuiltinTTS
ℹ Image API Type: GoogleScraperImageGen
ℹ Temp path: C:\Users\User1\Desktop\auto-shorts-0.1.1\video_temp
ℹ Res path: C:\Users\User1\Desktop\auto-shorts-0.1.1\res
ℹ Prompt: None (will be asked later)

--> Advanced options:
ℹ Delete files: true
ℹ Change photos: true
ℹ Disable TTS: false
ℹ Disable subtitles: false
ℹ Background video: Using random
ℹ Background music: Using random
? Change advanced options? (y/n) -> n
? What's your prompt (comment, etc.) ? -> Text Message Video
ℹ User prompt: Text Message Video
ℹ Generating video script...
ℹ Calling Ollama API with model: mistral
ℹ Error while calling Ollama API: fetch failed
C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\ai.js:71
throw new Error("Error while calling Ollama API: " + error.message);
^

Error: Error while calling Ollama API: fetch failed
at OllamaAIGen.generate (C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\ai.js:71:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async genAI (C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\index.js:71:24)
at async genVideoWithAI (C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\index.js:78:23)
at async cli (C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\cli.js:429:18)

Node.js v20.17.0

@xNoobkey
Copy link
Author

GOT IT TO WORK BUT STILL NO FULLY! after this mesagge this error comes up

ℹ Searching for images for rank 1 with query: unhappy_together

C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\image.js:55
const r_image1 = r_images_rep.photos[0].src.large;
^

TypeError: Cannot read properties of undefined (reading 'src')
at PexelsImageGen.generateImages (C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\image.js:55:57)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async genImages (C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\videogen.js:135:28)
at async RatherVideo.generateImages (C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\videogen.js:144:20)
at async RatherVideo.generateVideo (C:\Users\User1\AppData\Roaming\npm\node_modules\auto-shorts\dist\types\ratherVid.js:85:33)

Node.js v20.17.0

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

No branches or pull requests

2 participants