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

git source clone, npm run dev, Cherry bookmarks have broken icons and NodeJS console error "Proxy opts.uri is mandatory" #11

Closed
RocketDerp opened this issue Oct 10, 2022 · 5 comments

Comments

@RocketDerp
Copy link

RocketDerp commented Oct 10, 2022

Proxy opts.uri is mandatory
InvalidArgumentError: Proxy opts.uri is mandatory
   at buildProxyOptions (...cherry/node_modules/undici/lib/proxy-agent.js:28:11)
   at new ProxyAgent (...cherry/node_modules/undici/lib/proxy-agent.js:40:20)
   at ...cherry/src/routes/api/favicon/[site]/favicon.util.ts:16:61

I'm not running with docker or anything, just git clone of the project, setup .env for database, I was able to create (email/SQLite local) account through the webapp, then after adding a bookmark this error is on the server-side when running localhost in browser.

EDIT: More information. It's the images are broken on all the bookmark. In Chrome I opened the Image link in another tab and it's like this: http://localhost:5173/api/favicon/old.reddit.com - which generates the server-side console error.

I'm not running within docker, running native on Ubuntu 22.04 development machine. Thank you.

@RocketDerp RocketDerp changed the title git source clone, npm run dev, able to create account and login but first bookmark yields "Proxy opts.uri is mandatory" git source clone, npm run dev, Cherry bookmarks have broken icons and NodeJS console error "Proxy opts.uri is mandatory" Oct 10, 2022
@haishanh
Copy link
Owner

@RocketDerp I think I've fixed it in main, please check.

@RocketDerp
Copy link
Author

RocketDerp commented Oct 11, 2022

I did a git pull and tried it again, but still seems to fail.

My .env has no setting for HTTP_PROXY, so i think it is coming out undefined instead of an empty string.

I hacked line 17 from:

 ? { dispatcher: new ProxyAgent(HTTP_PROXY) }

to just

? {undefined}

And it works. But if I do console.log right before this const fetchInit is defined:

console.error("Hello World");
console.error(process.env.NODE_ENV);
console.error(HTTP_PROXY);

Both variables show in console log as undefined

@haishanh
Copy link
Owner

@RocketDerp mind try pull main and test it again?

@RocketDerp
Copy link
Author

@RocketDerp mind try pull main and test it again?

Ok, your 2nd attempt fixed it. Thank you. Closing issue.

@wjcty
Copy link

wjcty commented Dec 3, 2023

Please tell me how to solve it

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

3 participants