Closed andrewasd closed 2 years ago
The Preact module should import automatically when starting the project with deno task start
.
Deno automatically cache all dependencies so there is no "installation" to do.
I think you are just missing some VSCode settings (I'm assuming from the screenshot that this is VSCode):
.vscode/settings.json
file with:
{
"deno.enable": true
}
These instructions should be added to the documentation. So many people have issues like that.
The required VS Code files are now added in the init script.
I was still having this problem, but it resolved when I loaded the project folder itself in VSCode and not a parent folder. Just a tip for anyone else who might still get this error.
I have the same problem along with other errors like
'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.
I just completed the new project script from fresh and i have not modified anything.
I'm using VSCodium last version. The extension is installed and I can see Deno Language Server in Output picking up the configuration file.
In .vscode/settings.json
{ "deno.enable": true, "deno.lint": true, "editor.defaultFormatter": "denoland.vscode-deno", "[typescriptreact]": { "editor.defaultFormatter": "denoland.vscode-deno" }, "[typescript]": { "editor.defaultFormatter": "denoland.vscode-deno" }, "[javascriptreact]": { "editor.defaultFormatter": "denoland.vscode-deno" }, "[javascript]": { "editor.defaultFormatter": "denoland.vscode-deno" }, "css.customData": [ ".vscode/tailwind.json" ] }
The selected language is typescriptreact.
I expected it to work after restart but it does not.
Hi, im trying to run the code in this page after following all the docs but i don't know how to install the preact module https://fresh.deno.dev/docs/getting-started/create-a-route