Skip to content

Commit

Permalink
updated troubleshooting sdk guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mishushakov committed Jan 13, 2025
1 parent d0c5292 commit f24c2b7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Using JavaScript SDK with Vercel Edge Runtime and Cloudflare Workers
# Vercel Edge Runtime and Cloudflare Workers

The E2B JavaScript SDK currently lacks support for Vercel Edge Runtime and Cloudflare Workers due to transport layer package incompatibilities for Sandbox communication. We recommend using supported platforms like Node, Bun, or Deno.
The E2B JavaScript SDK currently lacks support for Vercel Edge Runtime and Cloudflare Workers due to transport layer package incompatibility used for Sandbox communication. We recommend using supported runtimes like Node, Bun, or Deno instead.
14 changes: 6 additions & 8 deletions apps/web/src/components/Navigation/NavigationLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export function NavigationLink({
className,
link,
}: {

className?: string
link: NavLink
}) {
Expand All @@ -18,7 +17,8 @@ export function NavigationLink({
const hash = typeof window !== 'undefined' ? window.location.hash : ''

// Modify the isActive check to include hash comparison if needed
const isActive = pathname === link.href ||
const isActive =
pathname === link.href ||
(link.href.includes('#') && pathname + hash === link.href)
// const pathname = usePathname()
// console.log(link)
Expand All @@ -34,19 +34,17 @@ export function NavigationLink({
isActive
? 'text-white bg-zinc-800'
: 'hover:text-white text-zinc-400 bg-transparent',
className,
className
)}
>
<div className="flex items-center justify-start gap-1">
<div className="flex items-center justify-start gap-1 overflow-hidden">
{link.icon}
{link.tag ? (
<div className="flex items-center gap-2">
<span className={clsx('truncate', isActive ? 'text-white' : '')}>
{link.title}
</span>
<Tag>
{link.tag}
</Tag>
<Tag>{link.tag}</Tag>
</div>
) : (
<span className={clsx('truncate', isActive ? 'text-white' : '')}>
Expand All @@ -56,4 +54,4 @@ export function NavigationLink({
</div>
</Link>
)
}
}
11 changes: 10 additions & 1 deletion apps/web/src/components/Navigation/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,15 @@ export const docRoutes: NavGroup[] = [
{
title: 'Troubleshooting',
items: [
{
title: 'SDKs',
links: [
{
title: 'Vercel Edge Runtime and Cloudflare Workers',
href: '/docs/troubleshooting/sdks/workers-edge-runtime',
},
],
},
{
title: 'Templates',
links: [
Expand Down Expand Up @@ -486,4 +495,4 @@ export const sdkRefRoutes: VersionedNavGroup[] = (
group?.title && sdkRefNameMap[group.title]
? sdkRefNameMap[group.title]
: group.title,
}))
}))

0 comments on commit f24c2b7

Please sign in to comment.