Skip to content

Commit

Permalink
fix: npm specifiers in example code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Ringrose committed Apr 27, 2024
1 parent f217a4b commit 1d16583
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion example/preactSSR/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ssr,
file,
} from "../../mod.ts"; //"https://deno.land/x/peko/mod.ts"
import { renderToString } from "preact-render-to-string";
import { renderToString } from "npm:preact-render-to-string";

// Preact page components and HTML template for ssrHandler render logic
import Home from "./src/pages/Home.ts";
Expand Down
4 changes: 2 additions & 2 deletions example/preactSSR/src/components/App.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useEffect } from "preact/hooks";
import { html } from "htm/preact";
import { useState, useEffect } from "npm:preact/hooks";
import { html } from "npm:htm/preact";
import List from "./List.ts";
import { useLocalState } from "../hooks/localstate.ts";

Expand Down
2 changes: 1 addition & 1 deletion example/preactSSR/src/components/Layout.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { html } from "htm/preact";
import { html } from "npm:htm/preact";

const Layout = ({
navColor,
Expand Down
4 changes: 2 additions & 2 deletions example/preactSSR/src/components/List.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from "preact/hooks";
import { html } from "htm/preact";
import { useState } from "npm:preact/hooks";
import { html } from "npm:htm/preact";

const List = ({ data }: { data: string[] }) => {
// takes a data prop
Expand Down
2 changes: 1 addition & 1 deletion example/preactSSR/src/hooks/localstate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, useEffect } from "preact/hooks";
import { useState, useEffect } from "npm:preact/hooks";

// INITIAL STATE
const initialState: Record<string, unknown> = {
Expand Down
2 changes: 1 addition & 1 deletion example/preactSSR/src/pages/About.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { html } from "htm/preact";
import { html } from "npm:htm/preact";

import Layout from "../components/Layout.ts";
import App from "../components/App.ts";
Expand Down
2 changes: 1 addition & 1 deletion example/preactSSR/src/pages/Home.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { html } from "htm/preact";
import { html } from "npm:htm/preact";

import Layout from "../components/Layout.ts";

Expand Down

1 comment on commit 1d16583

@deno-deploy
Copy link

@deno-deploy deno-deploy bot commented on 1d16583 Apr 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to deploy:

UNCAUGHT_EXCEPTION

PermissionDenied: Spawning subprocesses is not allowed on Deno Deploy.
    at Command.spawn (ext:deno_deploy/process.js:23:11)
    at new ChildProcess (ext:deno_node/internal/child_process.ts:95:10)
    at Object.spawn (node:child_process:86:10)
    at ensureServiceIsRunning (file:///node_modules/.deno/esbuild-wasm@0.20.2/node_modules/esbuild-wasm/lib/main.js:1970:29)
    at Module.initialize (file:///node_modules/.deno/esbuild-wasm@0.20.2/node_modules/esbuild-wasm/lib/main.js:1959:3)
    at file:///src/example/preactSSR/router.ts:21:17

Please sign in to comment.