examples icon indicating copy to clipboard operation
examples copied to clipboard

Examples are NOT Working in Ubuntu

Open jupegarnica opened this issue 2 years ago • 1 comments

FYI

1

Task dev deno run -A --unstable --node-modules-dir npm:vite
failed to load config from /home/juan/dev/denoland-examples/with-react/vite.config.mjs
error when starting dev server:
TypeError: Invalid package specifier 'npm:react-dom/client@^18.2'. Did you mean to write 'npm:react-dom@^18.2/client'?

Easily soved by changing npm:react-dom/client@^18.2' to 'npm:react-dom@^18.2/client

2

But this one in unsolvable in ubuntu (but it works in w11)

Task dev deno run -A --unstable --node-modules-dir npm:vite
error when starting dev server:
Error: getaddrinfo ENOTFOUND localhost
    at __node_internal_captureLargerStackTrace (https://deno.land/[email protected]/node/internal/errors.ts:113:11)
    at __node_internal_ (https://deno.land/[email protected]/node/internal/errors.ts:335:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (https://deno.land/[email protected]/node/internal/dns/promises.ts:67:17)
    at https://deno.land/[email protected]/node/internal_binding/cares_wrap.ts:111:9

jupegarnica avatar Nov 18 '22 13:11 jupegarnica

I tried running the example on Ubuntu 22.04 by two methods:

  • following step by step instructions to create the project manually
  • downloading the source code

I got the error 1 resolved with the method you described.

After that, I was able to run the app with

deno task dev

and the terminal gives

VITE v3.2.2 ready in 431 ms Local: http://localhost:5173/ Network: use --host to expose

When I open a browser at http://localhost:5173/ it brings up "Welcome to the Dinosaur app" and "Click on a dinosaur below to learn more." but nothing else. Opening the developer console opened with CTRL-J shoes the error Index.jsx:7 GET http://localhost:8000/api/ net::ERR_CONNECTION_REFUSED

atmelino avatar Dec 25 '22 00:12 atmelino