youkaclub / youka-desktop

The Best Karaoke Maker
https://www.youka.club/
460 stars 51 forks source link

Fail to execute start script #10

Closed umsaenga closed 4 years ago

umsaenga commented 4 years ago

Hi, Amazing idea, but can't get the server to start. Below is the details, any thoughts is appreciated. Thank you

Trying to npm start fails with error code 1.

Steps taken:

git clone https://github.com/youkaclub/youka-desktop.git
cd youka-desktop
npm install
npm start

Error received:

[0] 'BROWSER' is not recognized as an internal or external command,
[0] operable program or batch file.
[1] 'YOUKA_APP_URL' is not recognized as an internal or external command,
[1] operable program or batch file.
[0] BROWSER=none craco start exited with code 1
[1] YOUKA_APP_URL=http://localhost:3000 electron src/main.js exited with code 1

The full error log is attached. Using:

VS Code Version: 1.45.1 (user setup)
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:27:35.169Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18362 

2020-06-07T14_00_15_725Z-debug.log

youkaclub commented 4 years ago

The instructions are for MacOS, for windows please try the instructions below:

# the server is closed source, so you have to change the api url in config.js from "http://localhost:8000" to "https://api.audioai.online"

set BROWSER=none
node_modules\.bin\craco start 

# then in another terminal
set YOUKA_APP_URL http://localhost:3000
node_modules\.bin\electron src\main.js
umsaenga commented 4 years ago

Thank you for prompt reply.

# the server is closed source, so you have to change the api url in config.js from "http://localhost:8000" to "https://api.audioai.online" Updated config as noted, then:

set BROWSER=none
node_modules\.bin\craco start 

Above opens a blank window

# then in another terminal
set YOUKA_APP_URL http://localhost:3000
node_modules\.bin\electron src\main.js

Above returns error:

App threw an error during load
Error: ENOENT: no such file or directory, open 'C:\Users\poop\documents\kwf\youka-desktop\src\package.json'
    at Object.openSync (fs.js:440:3)
    at Object.func (electron/js2c/asar.js:140:31)
    at Object.func [as openSync] (electron/js2c/asar.js:140:31)
    at Object.readFileSync (fs.js:342:35)
    at Object.fs.readFileSync (electron/js2c/asar.js:542:40)
    at Object.fs.readFileSync (electron/js2c/asar.js:542:40)
    at validateInput (C:\Users\poop\documents\kwf\youka-desktop\node_modules\update-electron-app\index.js:110:23)
    at updater (C:\Users\poop\documents\kwf\youka-desktop\node_modules\update-electron-app\index.js:22:10)
    at Object.<anonymous> (C:\Users\poop\documents\kwf\youka-desktop\src\main.js:14:3)
    at Module._compile (internal/modules/cjs/loader.js:968:30)
youkaclub commented 4 years ago

Sorry, my main computer is mac.

I forgot the equal sign: set YOUKA_APP_URL="http://localhost:3000" set BROWSER="none"

Please comment out the line "autoUpdate();" in main.js, then start the react server using "node_modules.bin\craco start", wait for the "Compiled successfully!" message then open electron using "node_modules.bin\electron src\main.js". It works in my vm.

umsaenga commented 4 years ago

success. Thank you

wondering if you can point me where the background image is set please. I want simple black background, preferably from local source.

also is possible to choose local file instead of youtube? or run batch conversion?

thank you, excited to start looking at project.

youkaclub commented 4 years ago

wondering if you can point me where the background image is set please.

VideoListItem.jsx

also is possible to choose local file instead of youtube?

not yet

run batch conversion

please don't, the server can handle only one request at a time, batch will block other users

umsaenga commented 4 years ago

please don't, the server can handle only one request at a time, batch will block other users

oh, okay. good to know, wont.

I thought VideoListItem.jsx was for displaying the videos on the screen. I'm wanting the downloaded video to have a black screen versus the video. So text lyrics, instrument and black background. Possible?

youkaclub commented 4 years ago

you have to update the ffmpeg command in downloadVideo function to somthing like that (not tested):

.input(filepath(youtubeID, mediaMode, FILE_M4A))
.input("/path/to/black.png")
.addOptions(["-vf", assfilter, "-loop", "1", "-c:v", "libx264", "-tune", "stillimage", "-shortest"])

try first to find the working ffmpeg command without youka, then add the right parameters to "addOptions". see the answer here https://video.stackexchange.com/questions/29527/ffmpeg-create-a-black-background-video-from-audio-for-youtube-upload

umsaenga commented 4 years ago

I dont think my changes are being recognized by the app.

As a simple test I modified the highlight text under index.css#L33 to pink, start app , export video and highlight is still default blue. (I do this without changes to the video output in previous comment)

Even if I completely remove a file in the lib folder the app still works.

youkaclub commented 4 years ago

make sure you run the "node_modules.bin\electron src\main.js" command in the same terminal you run "set YOUKA_APP_URL="http://localhost:3000" "

umsaenga commented 4 years ago

make sure you run the "node_modules.bin\electron src\main.js" command in the same terminal you run "set YOUKA_APP_URL="http://localhost:3000" "

I Am

-- also, when starting craco (in a different terminal) I get this warning: Windows cannot find '\none\'. Make sure you typed the name correctly, and then try again.

I close the warning the craco compiles successfully. Then in a different terminal I run the youka app, as so:

set YOUKA_APP_URL="http://localhost:3000" node_modules.bin\electron src\main.js

Could the warning be the one causing the problems?

youkaclub commented 4 years ago

Css change is not a good test because it require full reload (ctrl+r in mac), try to remove some css class from js file

umsaenga commented 4 years ago

the app window that comes up for windows os does not recognize force refresh commands. It doesn't open in a browser.

Css change is not a good test because it require full reload (ctrl+r in mac), try to remove some css class from js file

app still does not recognize change

youkaclub commented 4 years ago

so try to change this line to "http://localhost:3000"

umsaenga commented 4 years ago

hello, can you point me please to where you control placement of captions at the bottom of the video?

And I thought the blue captions highlight wsa under index.css but it doesn't seem to change the colors..

Thank you

youkaclub commented 4 years ago

https://github.com/youkaclub/youka-desktop/blob/master/src/lib/ass.js#L39 https://github.com/youkaclub/youka-desktop/blob/master/src/lib/ass.js#L60