exhibitionist-digital / ultra

Zero-Legacy Deno/React Suspense SSR Framework
https://ultrajs.dev
MIT License
2.99k stars 67 forks source link

cannot build (make dev) project #10

Closed adaptive-shield-matrix closed 3 years ago

adaptive-shield-matrix commented 3 years ago

identified error:

error: Relative import path "global.d.ts" not prefixed with / or ./ or ../ and not in import map from "https://cdn.esm.sh/@types/react@17.0.20/index.d.ts"

complete steps/log

deno --version
deno 1.13.1 (release, x86_64-unknown-linux-gnu)
v8 9.3.345.11
typescript 4.3.5
  20:32  ~/Develop/testing
git clone https://github.com/exhibitionist-digital/ultra deno_ultra
Cloning into 'deno_ultra'...
remote: Enumerating objects: 659, done.
remote: Counting objects: 100% (515/515), done.
remote: Compressing objects: 100% (327/327), done.
remote: Total 659 (delta 323), reused 330 (delta 182), pack-reused 144
Receiving objects: 100% (659/659), 209.40 KiB | 3.95 MiB/s, done.
Resolving deltas: 100% (372/372), done.
  20:32  ~/Develop/testing
cd deno
deno-tutorials1/ deno_ultra/      
  20:32  ~/Develop/testing
cd deno_ultra/examples/react18/
  20:34  ~/.../examples/react18
make dev
mode=dev deno run --no-check --allow-net --allow-read --allow-env --allow-run --allow-write --import-map=importmap.json --unstable server.js
Download https://deno.land/x/ultra@v0.5/mod.ts
Download https://deno.land/x/ultra@v0.5/src/ultra.ts
Download https://deno.land/x/ultra@v0.5/src/types.ts
Download https://deno.land/x/oak@v9.0.0/mod.ts
Download https://deno.land/x/ultra@v0.5/src/render.ts
Download https://deno.land/std@0.106.0/path/mod.ts
Download https://deno.land/std@0.106.0/fs/mod.ts
Download https://deno.land/x/lru@1.0.2/mod.ts
Download https://deno.land/x/ultra@v0.5/src/transform.ts
Download https://deno.land/x/oak@v9.0.0/deps.ts
Download https://deno.land/x/oak@v9.0.0/http_server_std.ts
Download https://deno.land/x/oak@v9.0.0/middleware/proxy.ts
Download https://deno.land/x/oak@v9.0.0/request.ts
Download https://deno.land/x/oak@v9.0.0/application.ts
Download https://deno.land/x/oak@v9.0.0/response.ts
Download https://deno.land/x/oak@v9.0.0/send.ts
Download https://deno.land/x/oak@v9.0.0/middleware.ts
Download https://deno.land/x/oak@v9.0.0/context.ts
Download https://deno.land/x/oak@v9.0.0/body.ts
Download https://deno.land/x/oak@v9.0.0/range.ts
Download https://deno.land/x/oak@v9.0.0/server_sent_event.ts
Download https://deno.land/x/oak@v9.0.0/httpError.ts
Download https://deno.land/x/oak@v9.0.0/cookies.ts
Download https://deno.land/x/oak@v9.0.0/etag.ts
Download https://deno.land/x/oak@v9.0.0/router.ts
Download https://deno.land/x/oak@v9.0.0/testing.ts
Download https://deno.land/x/oak@v9.0.0/http_server_native.ts
Download https://deno.land/x/oak@v9.0.0/multipart.ts
Download https://deno.land/x/oak@v9.0.0/types.d.ts
Download https://deno.land/x/oak@v9.0.0/util.ts
Download https://deno.land/x/oak@v9.0.0/helpers.ts
Download https://x.nest.land/swc@0.1.4/mod.ts
Download https://deno.land/x/esbuild@v0.12.24/mod.js
Download https://deno.land/x/swc@0.1.4/types/options.ts
Download https://deno.land/std@0.106.0/fs/exists.ts
Download https://deno.land/std@0.106.0/fs/empty_dir.ts
Download https://deno.land/std@0.106.0/fs/ensure_file.ts
Download https://deno.land/std@0.106.0/fs/move.ts
Download https://deno.land/std@0.106.0/fs/copy.ts
Download https://deno.land/std@0.106.0/fs/ensure_dir.ts
Download https://deno.land/std@0.106.0/fs/ensure_symlink.ts
Download https://deno.land/std@0.106.0/fs/eol.ts
Download https://deno.land/std@0.106.0/fs/walk.ts
Download https://deno.land/std@0.106.0/fs/ensure_link.ts
Download https://deno.land/std@0.106.0/fs/expand_glob.ts
Download https://esm.sh/wouter?deps=react@18.0.0-alpha-67f38366a-20210830&bundle
Download https://esm.sh/react@18.0.0-alpha-67f38366a-20210830
Download https://esm.sh/react-helmet-async?deps=react@18.0.0-alpha-67f38366a-20210830&bundle
Download https://esm.sh/react-dom@18.0.0-alpha-67f38366a-20210830/server
Download https://deno.land/std@0.106.0/path/common.ts
Download https://deno.land/std@0.106.0/path/win32.ts
Download https://deno.land/std@0.106.0/path/separator.ts
Download https://deno.land/std@0.106.0/_util/os.ts
Download https://deno.land/std@0.106.0/path/_interface.ts
Download https://deno.land/std@0.106.0/path/glob.ts
Download https://deno.land/std@0.106.0/path/posix.ts
Download https://deno.land/x/oak@v9.0.0/async_iterable_reader.ts
Download https://deno.land/x/oak@v9.0.0/negotiation/mediaType.ts
Download https://deno.land/x/oak@v9.0.0/negotiation/language.ts
Download https://deno.land/x/oak@v9.0.0/negotiation/encoding.ts
Download https://deno.land/x/oak@v9.0.0/negotiation/charset.ts
Download https://deno.land/x/path_to_regexp@v6.2.0/index.ts
Download https://deno.land/std@0.105.0/bytes/mod.ts
Download https://deno.land/std@0.105.0/io/buffer.ts
Download https://deno.land/std@0.105.0/io/streams.ts
Download https://deno.land/std@0.105.0/http/server.ts
Download https://deno.land/std@0.105.0/io/util.ts
Download https://deno.land/std@0.105.0/path/mod.ts
Download https://deno.land/std@0.105.0/io/readers.ts
Download https://deno.land/std@0.105.0/testing/asserts.ts
Download https://deno.land/std@0.105.0/io/bufio.ts
Download https://deno.land/std@0.105.0/ws/mod.ts
Download https://deno.land/x/media_types@v2.10.1/mod.ts
Download https://deno.land/std@0.105.0/http/http_status.ts
Download https://deno.land/std@0.105.0/encoding/base64.ts
Download https://deno.land/x/oak@v9.0.0/keyStack.ts
Download https://deno.land/x/oak@v9.0.0/structured_clone.ts
Download https://deno.land/x/oak@v9.0.0/websocket.ts
Download https://deno.land/std@0.106.0/fs/_util.ts
Download https://deno.land/x/oak@v9.0.0/isMediaType.ts
Download https://deno.land/x/oak@v9.0.0/headers.ts
Download https://deno.land/x/oak@v9.0.0/content_disposition.ts
Download https://deno.land/x/oak@v9.0.0/buf_reader.ts
Download https://deno.land/std@0.106.0/_util/assert.ts
Download https://deno.land/x/oak@v9.0.0/negotiation/common.ts
Download https://deno.land/std@0.105.0/http/_io.ts
Download https://deno.land/std@0.105.0/_util/assert.ts
Download https://deno.land/std@0.105.0/async/mod.ts
Download https://deno.land/std@0.105.0/path/glob.ts
Download https://deno.land/std@0.105.0/path/separator.ts
Download https://deno.land/std@0.105.0/path/common.ts
Download https://deno.land/std@0.105.0/path/_interface.ts
Download https://deno.land/std@0.105.0/path/win32.ts
Download https://deno.land/std@0.105.0/_util/os.ts
Download https://deno.land/std@0.105.0/path/posix.ts
Download https://deno.land/x/media_types@v2.10.1/db.ts
Download https://deno.land/x/media_types@v2.10.1/deps.ts
Download https://deno.land/std@0.105.0/_util/has_own_property.ts
Download https://deno.land/std@0.105.0/async/deferred.ts
Download https://deno.land/std@0.105.0/textproto/mod.ts
Download https://deno.land/std@0.105.0/io/ioutil.ts
Download https://deno.land/std@0.105.0/crypto/mod.ts
Download https://deno.land/std@0.106.0/path/_util.ts
Download https://deno.land/std@0.106.0/path/_constants.ts
Download https://deno.land/std@0.105.0/io/types.d.ts
Download https://deno.land/x/oak@v9.0.0/tssCompare.ts
Download https://deno.land/x/oak@v9.0.0/mediaTyper.ts
Download https://deno.land/std@0.105.0/testing/_diff.ts
Download https://deno.land/std@0.105.0/fmt/colors.ts
Download https://deno.land/std@0.105.0/bytes/bytes_list.ts
Download https://deno.land/x/denoflate@1.2.1/mod.ts
Download https://deno.land/x/esbuild@v0.12.24/mod.d.ts
Download https://cdn.esm.sh/v49/react-dom@18.0.0-alpha-67f38366a-20210830/deno/server.js
Download https://cdn.esm.sh/@types/react-dom@18.0.0-alpha-67f38366a-20210830/server.d.ts
Download https://cdn.esm.sh/v49/react@18.0.0-alpha-67f38366a-20210830/deno/react.js
Download https://cdn.esm.sh/@types/react@17.0.20/index.d.ts
Download https://deno.land/std@0.105.0/async/debounce.ts
Download https://deno.land/std@0.105.0/async/delay.ts
Download https://deno.land/std@0.105.0/async/mux_async_iterator.ts
Download https://deno.land/std@0.105.0/async/pool.ts
Download https://deno.land/std@0.105.0/async/tee.ts
Download https://deno.land/std@0.105.0/async/deadline.ts
Download https://deno.land/std@0.105.0/path/_util.ts
Download https://deno.land/std@0.105.0/path/_constants.ts
Download https://deno.land/std@0.105.0/_wasm_crypto/mod.ts
Download https://arweave.net/V1fQ06LQBlZRczbAOoQQBsfCgbP00TTXGQ2VUUbWS7w/mod.ts
Download https://cdn.esm.sh/v49/object-assign@4.1.1/deno/object-assign.js
Download https://deno.land/x/denoflate@1.2.1/pkg/denoflate_bg.wasm.js
Download https://deno.land/x/denoflate@1.2.1/pkg/denoflate.js
Download https://k5l5bu5c2adfmultg3advbaqa3d4fant6titjvyzbwkvcrwwjo6a.arweave.net/V1fQ06LQBlZRczbAOoQQBsfCgbP00TTXGQ2VUUbWS7w/mod.ts
Download https://deno.land/std@0.105.0/_wasm_crypto/crypto.js
Download https://deno.land/std@0.105.0/_wasm_crypto/crypto.wasm.js
Download https://k5l5bu5c2adfmultg3advbaqa3d4fant6titjvyzbwkvcrwwjo6a.arweave.net/V1fQ06LQBlZRczbAOoQQBsfCgbP00TTXGQ2VUUbWS7w/types/options.ts
Download https://k5l5bu5c2adfmultg3advbaqa3d4fant6titjvyzbwkvcrwwjo6a.arweave.net/V1fQ06LQBlZRczbAOoQQBsfCgbP00TTXGQ2VUUbWS7w/swc_wasm/wasm.js
Download https://deno.land/x/lz4@v0.1.2/mod.ts
Download https://cdn.esm.sh/v49/wouter@2.7.4/X-ZGVwczpyZWFjdEAxOC4wLjAtYWxwaGEtNjdmMzgzNjZhLTIwMjEwODMw/deno/wouter.bundle.js
Download https://cdn.esm.sh/X-ZGVwczpyZWFjdEAxOC4wLjAtYWxwaGEtNjdmMzgzNjZhLTIwMjEwODMw/wouter@2.7.4/index.d.ts
Download https://cdn.esm.sh/v49/react-helmet-async@1.1.2/X-ZGVwczpyZWFjdEAxOC4wLjAtYWxwaGEtNjdmMzgzNjZhLTIwMjEwODMw/deno/react-helmet-async.bundle.js
Download https://cdn.esm.sh/X-ZGVwczpyZWFjdEAxOC4wLjAtYWxwaGEtNjdmMzgzNjZhLTIwMjEwODMw/react-helmet-async@1.1.2/index.d.ts
Download https://deno.land/x/lz4@v0.1.2/wasm.js
error: Relative import path "global.d.ts" not prefixed with / or ./ or ../ and not in import map from "https://cdn.esm.sh/@types/react@17.0.20/index.d.ts"
make: *** [makefile:2: dev] Error 1

since im new with deno -> this is a show stopper for me

polyrainbow commented 3 years ago

As a temporary workaround, you can add the path to manually to the import map by adding the line

"global.d.ts": "https://cdn.esm.sh/@types/react@17.0.20/global.d.ts" to the file ultra/examples/react18/importmap.json.

mashaal commented 3 years ago

I think @SebastianZimmer's suggestion would fix this. Any bare imports will need to be added to your importmap, or else you can use the fully qualified CDN url.

I will update the docs for this type of usage, apologies its not very clear atm.

Note: I was able to replicate this bug, it seems there is a discrepancy with the published types for React 18 (or lack thereof) -- I've updated the react imports in the examples to disable typechecking for now, and this should get around this issue.