livebud / bud

The Full-Stack Web Framework for Go
MIT License
5.58k stars 179 forks source link

[ERROR] Could not resolve "svelte/internal" #119

Closed donovanrost closed 2 years ago

donovanrost commented 2 years ago

I'm following along the HackerNews video and am encountering build issues. I'm performing the following steps

mkdir bud-test
cd bud-test
bud create .
bud build
bud run
bud new controller stories:/ index show

When I go to the webpage I'm given the following error

| conjure: generate "bud/.app/view/view.go" > ✘ [ERROR] Could not resolve "svelte/internal"

    view/index.svelte:7:7:
      7 │ } from "svelte/internal";
        ╵        ~~~~~~~~~~~~~~~~~

  You can mark the path "svelte/internal" as external to exclude it from the
  bundle, which will remove this error.

✘ [ERROR] Could not resolve "svelte/internal"

    view/show.svelte:2:51:
      2 │ import { create_ssr_component, each, escape } from "svelte/internal";
        ╵                                                    ~~~~~~~~~~~~~~~~~

  You can mark the path "svelte/internal" as external to exclude it from the
  bundle, which will remove this error.

Here are some details about my environment

bud version
➜  bud-test bud version  
     bud: 0.1.4
  svelte: 3.47.0
   react: 18.0.0
go version
go version go1.18.3 darwin/arm64
matthewmueller commented 2 years ago

Thanks for trying bud @donovanrost!

That's odd! Can you verify that you have node_modules/svelte in your bud-test directory? What OS are you on?

matthewmueller commented 2 years ago

Ping @donovanrost

donovanrost commented 2 years ago

I did not have node_modules/svelte in my bud-test directory. npm install fixed the issue  🤦

matthewmueller commented 2 years ago

I'm still surprised this happened. It should be installed automatically. What OS are you running @donovanrost?