Kiran
Kiran
Explore posts from servers
HHono
Created by Kiran on 11/11/2024 in #help
Netlify error
I copied the docs exactly from https://hono.dev/docs/getting-started/netlify to clone the netlify template. As soon as I run netlify dev, I get this error.
kiran@KiranMac my-app % netlify dev
β—ˆ Netlify Dev β—ˆ
β—ˆ Injecting environment variable values for all scopes
β—ˆ Ignored general context env var: LANG (defined in process)
β—ˆ No app server detected. Using simple static server
β—ˆ Unable to determine public folder to serve files from. Using current working directory
β—ˆ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
β—ˆ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
β—ˆ Running static server from "my-app"
β—ˆ Setting up local development server
Cleaned up .netlify/functions-internal.

β—ˆ Static server listening to 3999

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚
β”‚ β—ˆ Server now ready on http://localhost:8888 β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β—ˆ Failed to run Edge Function index:
TypeError: Import 'https://registry-staging.deno.com/@hono/hono/meta.json' failed: error sending request for url (https://registry-staging.deno.com/@hono/hono/meta.json): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known
at file:///Users/kiran/Downloads/tests/my-app/netlify/edge-functions/index.ts:1:22
at async file:///Users/kiran/Downloads/tests/my-app/.netlify/edge-functions-serve/dev.js:7:35 {
code: "ERR_MODULE_NOT_FOUND"
}
TypeError: Import 'https://registry-staging.deno.com/@hono/hono/meta.json' failed: error sending request for url (https://registry-staging.deno.com/@hono/hono/meta.json): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known
at file:///Users/kiran/Downloads/tests/my-app/netlify/edge-functions/index.ts:1:22
at async file:///Users/kiran/.nvm/versions/node/v20.17.0/lib/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/deno/config.ts:12:10 {
code: "ERR_MODULE_NOT_FOUND"
}
kiran@KiranMac my-app % netlify dev
β—ˆ Netlify Dev β—ˆ
β—ˆ Injecting environment variable values for all scopes
β—ˆ Ignored general context env var: LANG (defined in process)
β—ˆ No app server detected. Using simple static server
β—ˆ Unable to determine public folder to serve files from. Using current working directory
β—ˆ Setup a netlify.toml file with a [dev] section to specify your dev server settings.
β—ˆ See docs at: https://docs.netlify.com/cli/local-development/#project-detection
β—ˆ Running static server from "my-app"
β—ˆ Setting up local development server
Cleaned up .netlify/functions-internal.

β—ˆ Static server listening to 3999

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚
β”‚ β—ˆ Server now ready on http://localhost:8888 β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β—ˆ Failed to run Edge Function index:
TypeError: Import 'https://registry-staging.deno.com/@hono/hono/meta.json' failed: error sending request for url (https://registry-staging.deno.com/@hono/hono/meta.json): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known
at file:///Users/kiran/Downloads/tests/my-app/netlify/edge-functions/index.ts:1:22
at async file:///Users/kiran/Downloads/tests/my-app/.netlify/edge-functions-serve/dev.js:7:35 {
code: "ERR_MODULE_NOT_FOUND"
}
TypeError: Import 'https://registry-staging.deno.com/@hono/hono/meta.json' failed: error sending request for url (https://registry-staging.deno.com/@hono/hono/meta.json): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known
at file:///Users/kiran/Downloads/tests/my-app/netlify/edge-functions/index.ts:1:22
at async file:///Users/kiran/.nvm/versions/node/v20.17.0/lib/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/deno/config.ts:12:10 {
code: "ERR_MODULE_NOT_FOUND"
}
1 replies
CCConvex Community
Created by Kiran on 7/24/2024 in #support-community
Self-hosting convex on domain with cloudflare
I'm running the convex open source backend, which works great locally. I wanted to expose it through a cloudflare tunnel on my custom domain name so I could access it from other devices, but when I expose port 3210 (which is what I saw being used in the just file) through a cloudflare tunnel to my domain at convex.---.com, and then replace the --url param with the new url, it doesn't work. I see the following error from the just convex dev command (replaced my domain with ---)
βœ– Error: Unable to run schema validation on http://convex.---.com
Error fetching POST http://convex.---.com/api/prepare_schema 405 Method Not Allowed
βœ– Error: Unable to run schema validation on http://convex.---.com
Error fetching POST http://convex.---.com/api/prepare_schema 405 Method Not Allowed
I'm guessing it's because it needs a proxy URL set so it knows where to send API requests. Is there a way to fix this?
25 replies
PD🧩 Plasmo Developers
Created by Kiran on 5/6/2024 in #πŸ”°newbie
Re-rendering with a custom render function
I'm using a custom render and getRootContainer function in order to mount a custom element directly onto a specific pre-existing div without the use of shadow root (in order to adopt the existing page styles) and to avoid using any typical Plasmo parent elements. However, unlike the default exported component which automatically re-renders when the root is removed and added back in, this custom render does not adopt the functionality. When my custom root container that I've declared is removed from the page and added back in, my custom BetterInput component does not re-render. What is the best way to solve this problem? The following is my code:
export const getRootContainer = () =>
new Promise((resolve) => {
const checkInterval = setInterval(() => {
const rootContainerParent = document.querySelector("._2-F7v")
if (rootContainerParent) {
clearInterval(checkInterval)
resolve(rootContainerParent)
}
}, 10)
});

// Use this to optimize unmount lookups
export const getShadowHostId = () => "better-input";

// Override render to directly place custom component without parent
export const render: PlasmoRender = async ({
// anchor, // the observed anchor, OR document.body.
createRootContainer // This creates the default root container
}) => {
const rootContainer = await createRootContainer()

const root = createRoot(rootContainer) // Any root
root.render(
<BetterInput/>
)
}

const BetterInput = () => {
return (
<input
className="better-input"
placeholder="Type here..."
>
</input>
)
};
export const getRootContainer = () =>
new Promise((resolve) => {
const checkInterval = setInterval(() => {
const rootContainerParent = document.querySelector("._2-F7v")
if (rootContainerParent) {
clearInterval(checkInterval)
resolve(rootContainerParent)
}
}, 10)
});

// Use this to optimize unmount lookups
export const getShadowHostId = () => "better-input";

// Override render to directly place custom component without parent
export const render: PlasmoRender = async ({
// anchor, // the observed anchor, OR document.body.
createRootContainer // This creates the default root container
}) => {
const rootContainer = await createRootContainer()

const root = createRoot(rootContainer) // Any root
root.render(
<BetterInput/>
)
}

const BetterInput = () => {
return (
<input
className="better-input"
placeholder="Type here..."
>
</input>
)
};
11 replies
MModular
Created by Kiran on 10/17/2023 in #questions
Build options - supported platforms
Hi! I know the SDK only supports linux right now, but does that also mean that you can only build for linux, and not for Windows/macOS yet?
3 replies