svelte-adapter-deno icon indicating copy to clipboard operation
svelte-adapter-deno copied to clipboard

Unable to use Deno inside a components' script tags

Open jakubdonovan opened this issue 2 years ago • 8 comments

<script>
	const res = await fetch('https://example-29544e.webflow.io');
</script>

produces the following error

Cannot use keyword 'await' outside an async functionsvelte(parse-error) 'await' expressions are only allowed within async functions and at the top levels of modules.js(1308)

I started my development server via npm run dev but it looks like it's still running node rather than Deno. Can I get some help?

jakubdonovan avatar Nov 10 '22 09:11 jakubdonovan