there's no way to automate runframe updates if they don't list dependencies. I see a lot of things listed in devDependencies that should really be runtime dependencies. If you have versioning conflicts with downstream packages, I don't see how it wouldn't be a problem with runframe if you don't list dependencies at all
Seve
"tscircuit" as a package provides a ton of transient dependencies, it isn't always simple
A
astrimid
so it's a polyrepo but a single workspace, seems to be worst of both worlds
Seve
this is a very large codebase
Seve
(there are 500 repos)
A
astrimid
so, can I install tscircuit/tscircuit and get runframe depdendencies for free?
latest version here: https://docs.tscircuit.com/contributing/package-dependencies-and-auto-updates
Seve
those are the "major" dependencies
Seve
but the autorouter alone (which is excluded from that diagram because it has a special release team) has almost 100 dependencies itself haha
but those are absolutely the major ones
something is seriously wrong with package.json/build pipeline. it means those are not real packages, just code that happens to be on npm - monorepo code that published to npm as a side effect. you might as well not publish to npm at all
Seve
the packaging is not perfect but it is usab.e. I have no idea what the "dependent" packages are there, since they are unaffiliated users of the library (presumably)
A
astrimid
npm tracks all package that lists the package in question in "dependencies" as a dependent. if you don't have pcv-vewier in depedendencies of any of your repos, that means you have a build pipeline that doesn't use npm
A
astrimid
for example, why `footprinter` is a `devDependency` of `tscircuit`? Does it not run in runtime?
why exactly all dependencies are devDependencies? I don't get it
A
astrimid
So it's a deliberate design choice:
https://github.com/tscircuit/lint/issues/4
A
astrimid
this is expected behavior when you use 0.0.x packages. npm duplicates 0.0.x dependencies because semVer standard treats every 0.0.x version as containing breaking changes. had you used compatible versions, such as "1.0.*", npm would've always installed the latest version of the package, which is what you probably want
if the versions are deemed compatible by the semver convention, npm deduplicates packages and installes the minimum compatible combination
A
astrimid
if you want to force package version to be compatible, you can put `"overrides"` in `package.json` root and it would use that single version for all dependencies
Seve
i think for most users, they only need to use "tscircuit"
Seve
so you're basically talking about internal ecosystem stuff for the most part, even for startups building on tscircuit, they can just use "tscircuit"
Seve
because there is special bundling etc. it really isn't possible to use the dependency system as is
Seve
you could look at tsup's bundling behavior if this sounds interesting, but i think it's much easier to just have the ecosystem consume "tscircuit" because we can provide strong contracts for that usage
afaik, npm doesn't have any way to install transitive devdependencies
Seve
circuit-json-to-pnp-csv should be built in
Seve
there are no transitive dev deps, dev deps are BUNDLED
Seve
so "marked" is, for some reason, not being bundled
Seve
which means it needs to either be provided as a transitive dependency by tscircuit or as a bundled dependency for runframe
Seve
CC <@452450065941004289> & <@809856037376491570> do you guys know what's up with marked?
A
astrimid
maybe something with bun version?
Seve
circuit-json-to-pnp-csv should be inside the main tscircuit/tscircuit package.json so that is a legit bug
A
astrimid
```
bun --version
1.3.14
```
A
astrimid
I'm importing via `import { RunFrame } from "@tscircuit/runframe"`
is there a way to import from `@tscircuit/core` or someting
R
Rishabh
No idea
Seve
maybe it's a big dep so deliberately excluded, but honestly astramid i would just work around those with a temporary install of the two missing deps
Seve
we'll patch the issue tho
Seve
just need to figure out why chestertons fence is there on marked
A
astrimid
it's not just two, there are hundreds of deps missing. could you provide any starter bun/vite project with runframe?
A
astrimid
so that we could isolate whether it's environment issue or a bug
R
Rishabh
Let me try to see if I can create a runframe project
A
astrimid
maybe it's a vite issue?
```
✘ [ERROR] Failed to resolve entry for package "@tscircuit/core". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:46638:18:
46638 │ const err = new Error(
```
A
astrimid
LLM suggests that `yalc add @tscircuit/runframe` is the only way to use tscircuit
Seve
fwiw you can always use the iframe method of running runframe
Seve
but i think Rishabh is looking into this now so we should know shortly
Could be vite bundler conflict?
```
✘ [ERROR] Missing "./iframe" specifier in "@tscircuit/runframe" package [plugin vite:dep-scan]
node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:46042:28:
...
This error came from the "onResolve" callback registered here:
node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:49789:12:
49789 │ build.onResolve(
╵ ~~~~~~~~~
The plugin "vite:dep-scan" was triggered by this import
src/App.tsx:1:35:
1 │ import { RunFrameWithIframe } from "@tscircuit/runframe/iframe"
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
A
astrimid
do you use bun or vite?
R
Rishabh
I was able to run a small runframe project with only `runframe` and `tscircuit` just make sure you are using the `standalone` bundle from runframe.
This is the zip generated from ai if you wanna take a look
calculate-cell-boundaries uses react 18 in dependencies:
https://github.com/tscircuit/calculate-cell-boundaries/blob/a44e1edc42fec857399421f60973a05923a1d969/package.json#L19
while it should really be peer dependencies ^17.0.0 || ^18.0.0 || ^19.0.0 like radix
A
astrimid
similarly, jscad-electronics uses ^19, so it's marked as incompatible with calculate-cell-boundaries:
https://github.com/tscircuit/jscad-electronics/blob/3644ce6ab469fc83b27a090b1529b0a8120472c2/package.json#L54
so even for such a basic dependency as react, version dependency is inconsistent
A
astrimid
I don't know whether it means duplicate react versions or whether react is bundled or is it really a peer dependency
Seve
hmm
Seve
calculate-cell-boundaries should only be using dev deps
Seve
usually we try to use "*" for peer deps
A
astrimid
more errors:
```
✘ [ERROR] No matching export in "node_modules/@tscircuit/checks/dist/index.js" for import "dedupePcbDrcErrors"
node_modules/@tscircuit/core/dist/index.js:15106:2:
15106 │ dedupePcbDrcErrors,
╵ ~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "node_modules/@tscircuit/circuit-json-util/dist/index.js" for import "getSchematicElementBounds"
node_modules/@tscircuit/core/dist/index.js:34618:2:
34618 │ getSchematicElementBounds
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~
1467 | let { file, line, column } = e.location;
1468 | let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : "";
1469 | return `
1470 | ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
1471 | }).join("");
1472 | let error = new Error(text);
^
error: Build failed with 2 errors:
node_modules/@tscircuit/core/dist/index.js:15106:2: ERROR: No matching export in "node_modules/@tscircuit/checks/dist/index.js" for import "dedupePcbDrcErrors"
node_modules/@tscircuit/core/dist/index.js:34618:2: ERROR: No matching export in "node_modules/@tscircuit/circuit-json-util/dist/index.js" for import "getSchematicElementBounds"
```
A
astrimid
apparently, because core doesn't specify versions it depends on, so bun install succeeeds, but it runtime fails
A
astrimid
├─ @tscircuit/3d-viewer@0.0.15 (requires ^18.3.1)
├─ @tscircuit/schematic-autolayout@0.0.5 (requires ^18.2.0)
├─ calculate-cell-boundaries@0.0.13 (requires ^18.3.1)
so there are 3 tscircuit package that require react 18. Maybe I can' update them
A
astrimid
updating those 2 helped, so that leaves only one, ├─ calculate-cell-boundaries@0.0.13 (requires ^18.3.1)
Seve
<@809856037376491570> is this a calculate-cell-boundaries issue?
R
Rishabh
i don't know, the example repro by AI is using the runframe standalone bundle without having any deps issue
A
astrimid
success. `overrides` helped to fix the duplicate react 18/19 issue. I had to manually specify all the dependencies and tweak versions.
I've summariesed the `devDependencies` issue in a separate thread. The schematic-viewer issue and react conflict are separate issues. https://community.tscircuit.com/thread/1531639565788647506
Want to add to the conversation?
Reply in Discord so your notes stay connected to the source.