Arduano - another another issue: pressing "impo...

another another issue: pressing "import component" on a tscircuit component gives a 404
No description
22 Replies
Arduano
ArduanoOP4w ago
how does importing work anyway? I don't see @tsci/seveibar.smd-usb-c in package.json or anywhere else in the repo so how does it know to install it but not the other one?
No description
Arduano
ArduanoOP4w ago
there's no npm package for @tsci/seveibar.rp2040-zero
Seve
Seve4w ago
it does a dynamic import when you're using tscircuit.com "@tsci/*" refers to the tscircuit.com repository so it doesn't load from npm
Arduano
ArduanoOP4w ago
do you recommend I switch to tscircuit.com? I started doing it locally to co-locate some project files
Seve
Seve4w ago
the 404 error you're seeing there is strange because /api/api is present in the url, are you running locally and having an issue?
Arduano
ArduanoOP4w ago
locally yes
Seve
Seve4w ago
you should use tsci dev to develop circuits, it's much better and your circuits can live locally
Arduano
ArduanoOP4w ago
I run pnpm tsci dev locally yes didn't want to install -g so it's a dev dep instead
Seve
Seve4w ago
ah ok understood /api/api/events/create is definitely a bug
Arduano
ArduanoOP4w ago
what's a workaround? jlcpcb importing works but I need the soldered pins footprint by the way I'm completely new to circuit design so I'm sorry if I sound dumb sometimes haha
Seve
Seve4w ago
so you want to import from @tsci/* and it's not working because there's some bug with importing from the tscircuit registry. Understood, the workaround is simple, just do tsci add @tsci/seveibar.smd-usbc or whatever that should allow you to add the dependency you're trying to add while we fix the issue
Arduano
ArduanoOP4w ago
hmm
pnpm tsci add @tsci/seveibar.rp2040-zero ─╯
Adding @tsci/seveibar.rp2040-zero...
✔ No .npmrc entry for @tsci packages was found. Add '@tsci:registry=https://npm.tscircuit.com'? … yes
Updated .npmrc with tscircuit registry
> pnpm add @tsci/seveibar.rp2040-zero
 WARN  deprecated @vitest/coverage-c8@0.24.5: v8 coverage is moved to @vitest/coverage-v8 package
 WARN  5 deprecated subdependencies found: abab@2.0.6, domexception@4.0.0, glob@7.2.3, inflight@1.0.6, rimraf@3.0.2
Packages: +1
+
Progress: resolved 502, reused 423, downloaded 1, added 1, done
 ERR_PNPM_BAD_PACKAGE_JSON  /home/arduano/programming/embedded/onsen-egg-cooker/pcb/node_modules/.pnpm/@tsci+seveibar.rp2040-zero@0.0.18/node_modules/@tsci/seveibar.rp2040-zero/package.json: Invalid name: "seveibar/rp2040-zero"
Failed to add @tsci/seveibar.rp2040-zero: Command failed: pnpm add @tsci/seveibar.rp2040-zero
pnpm tsci add @tsci/seveibar.rp2040-zero ─╯
Adding @tsci/seveibar.rp2040-zero...
✔ No .npmrc entry for @tsci packages was found. Add '@tsci:registry=https://npm.tscircuit.com'? … yes
Updated .npmrc with tscircuit registry
> pnpm add @tsci/seveibar.rp2040-zero
 WARN  deprecated @vitest/coverage-c8@0.24.5: v8 coverage is moved to @vitest/coverage-v8 package
 WARN  5 deprecated subdependencies found: abab@2.0.6, domexception@4.0.0, glob@7.2.3, inflight@1.0.6, rimraf@3.0.2
Packages: +1
+
Progress: resolved 502, reused 423, downloaded 1, added 1, done
 ERR_PNPM_BAD_PACKAGE_JSON  /home/arduano/programming/embedded/onsen-egg-cooker/pcb/node_modules/.pnpm/@tsci+seveibar.rp2040-zero@0.0.18/node_modules/@tsci/seveibar.rp2040-zero/package.json: Invalid name: "seveibar/rp2040-zero"
Failed to add @tsci/seveibar.rp2040-zero: Command failed: pnpm add @tsci/seveibar.rp2040-zero
Seve
Seve4w ago
hmm ok i wonder if this is pnpm specific or not, we will need to investigate. these are two separate bugs
Linear
Linear4w ago
Issue TSC-133 created.
TSC-133 - Unable to do tsci add @tsci/seveibar.rp2040-zero with pnpm
pnpm tsci add @tsci/seveibar.rp2040-zero ─╯ Adding @tsci/seveibar.rp2040-zero... ✔ No .npmrc entry for @tsci packages was found. Add '@tsci:registry=https://npm.tscircuit.com'? … yes Updated .npmrc with tscircuit registry > pnpm add @tsci/seveibar.rp2040-zero  WARN  deprecated @vitest/coverage-c8@0.24.5: v8 coverage is moved to @vitest/coverage-v8 package  WARN  5 deprecated subdependencies found: abab@2.0.6, domexception@4.0.0, glob@7.2.3, inflight@1.0.6, rimraf@3.0.2 Packages: +1 + Progress: resolved 502, reused 423, downloaded 1, added 1, done  ERR_PNPM_BAD_PACKAGE_JSON  /home/arduano/programming/embedded/onsen-egg-cooker/pcb/node_modules/.pnpm/@tsci+seveibar.rp2040-zero@0.0.18/node_modules/@tsci/seveibar.rp2040-zero/package.json: Invalid name: "seveibar/rp2040-zero" Failed to add @tsci/seveibar.rp2040-zero: Command failed: pnpm add @tsci/seveibar.rp2040-zero
Status
Backlog
tscircuit
Arduano
ArduanoOP4w ago
I'll see what I can figure out, I think I get the overall idea though, worst case I'll switch to web
Seve
Seve4w ago
we should have these patched by ~tonight- sorry about that!
Arduano
ArduanoOP4w ago
but overall this feels much more approachable than all the complexity of traditional pcb cad software haha happy to power through these bugs for you guys
Seve
Seve4w ago
tyty appreciated!
Arduano
ArduanoOP4w ago
Switching to npm caused all sorts of other issues, but that's probably just npm being npm switching to Bun worked
Seve
Seve4w ago
yea i think i know what the issue is, pnpm is being anal about the package name returned from tscircuit.com matching the installation name. Which is fine, but we were returning "seveibar/rp2040-zero" instead of "@tsci/seveibar.rp2040-zero", a patch is on the way we're going to eventually make tsci a binary with bun bundled inside so that there's less issues with package managers, but we do want to be compatible
DOPΣ
DOPΣ3w ago
should be fixed in latest cli version

Did you find this page helpful?