Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install doesn't actually work. #1

Open
nickisnoble opened this issue Oct 19, 2023 · 6 comments
Open

Install doesn't actually work. #1

nickisnoble opened this issue Oct 19, 2023 · 6 comments

Comments

@nickisnoble
Copy link

nickisnoble commented Oct 19, 2023

1. Following your instructions:

bun i deta/tela && cd ./node_modules/@deta/tela && bun i && bun run package

(Which already kinda sucks because now I need to modify my entire build process with a kludge for one package – and seems to add a bunch of stuff that I really don't want in my bundle, like storybook)

2. Having a fresh sveltekit app with this component:

<script lang="ts">
  import Board from "@deta/tela/Board.svelte";
  import Positionable from "@deta/tela/Positionable.svelte";
  import type { TBoard, TBoardSettings } from "@deta/tela/index.js";
  import { writable } from "svelte/store";

  const settings = writable({} satisfies TBoardSettings);
  const board = writable({} satisfies TBoard);
</script>

<main>
  <Board {settings} {board}>
    <Positionable pos={{ x: 10, y: 10 }} size={{ x: 400, y: 300 }} z={1}>
      Hello, I am tela.
    </Positionable>

    <Positionable pos={{ x: 200, y: 150 }} size={{ x: 400, y: 300 }} z={1}>
      Try moving the canvas around with the trackpad or by using META + Left Mouse.
    </Positionable>
  </Board>
</main>

<style>
  main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
</style>

(I do wish it was a one liner:
import {Board, Positionable, type TBoard, type TBoardSettings} from "@deta/tela";
)

... results in a 500 error.

Error: Missing "./Board.svelte" specifier in "@deta/tela" package
    at e (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:21445:25)
    at n (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:21445:627)
    at o (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:21445:1297)
    at resolveExportsOrImports (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:28741:20)
    at resolveDeepImport (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:28760:31)
    at tryNodeResolve (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:28448:20)
    at Context.resolveId (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:28207:28)
    at Object.resolveId (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:44269:64)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async TransformContext.resolve (file:///Users/.../node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:43985:23
@MaximilianHeidenreich
Copy link
Member

MaximilianHeidenreich commented Oct 19, 2023

hey @nickisnoble, thx for the issue. Yea this is impractical. We didn't get around to publishing it to npm due to time reasons and us already making improvements & fixing a lot of stuff in version 2.0 (Including cleaning up the documentation, removing all the storyboard stuff etc.). Hopefully, we have time to update & publish the new version some time in the following weeks.

@nickisnoble
Copy link
Author

Is that the nnnew branch? I'd love to try it even if it's early

@MaximilianHeidenreich
Copy link
Member

yea, the nnnew branch it is. You are welcome to check it out if you like, but keep in mind that the changes also make the existing docs not entirely relevant any longer. But the main concepts still apply.

@MaximilianHeidenreich
Copy link
Member

@nickisnoble quick update, v3 is coming together. Feel free to take a look at the v3.0 branch. There is also an example / test page under src/routes/v3/test/+page.svelte.

@sallaben
Copy link

@MaximilianHeidenreich Willing to help on v3/v4/vwhatever to get a NPM release going. What's the roadmap to getting it ready? I am interested in helping.

@MaximilianHeidenreich
Copy link
Member

@sallaben Hey, thanks for your interest and sry for the late answer. We have been quite busy. I am currently experimenting with v5 / Svelte 5 as this seems to be a big leap. Will be adding that branch some time soon. I'ma get back to you on that as soon as thats there 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants