Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

@rescript/runtime dependency problems

$
0
0

I have the same problem with SvelteKit/Vite.

[plugin:vite:import-analysis] Failed to resolve import "@rescript/runtime/lib/es6/Stdlib_Option.js" from "src/lib/some/file". Does the file exist?

I have rescript installed as regular dependency (not dev) at version 12.0.1. Also, looking into node_modules it looks like @rescript/runtime is not installed for some reason. Under @rescript I see only webapi package (which I’ve installed alongside so it’s expected to be there)

And under rescript I can see cli, docs, and ninja but not runtime

Explicitly adding @rescript/runtime fixes the issue but from what I understand from this thread it’s not the intended behavior

EDIT: Forgot to mention that I use Bun as bundler

EDIT 2: In case anyone like me has this issue, I fixed it by changing to hoisted install in bunfig.toml

[install]
linker = "isolated"

Viewing all articles
Browse latest Browse all 2592

Trending Articles