You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
X [ERROR] No matching export in "node_modules/fontkit/dist/browser-module.mjs" for import "default"
node_modules/@capsizecss/unpack/dist/capsizecss-unpack.browser.esm.js:3:7:
3 │ import fontkit from 'fontkit';`
PS - Awesome project! I ended up using the GH site to upload fonts & then lift the metrics from there & they worked absolutely perfectly.
The text was updated successfully, but these errors were encountered:
pretty busy atm but I updated the package & re-run quickly & this is what I get.
When I run via await fromUrl instead I get a different error: Uncaught ReferenceError: Buffer is not defined onLoadEnd index.js:17 blobToBuffer2 index.js:20 fromBlob index.mjs:75 fromBlob index.mjs:74 fromUrl index.mjs:93 async* main.ts:7
There's always a chance it's just something screwed up on my end...I do spend most of my life bashing away with things I don't understand :)
If you have a repro you can share that'll help. In the mean time we have cut the release now, so any further testing can be against latest published versions.
I'm getting an error when trying to import unpack. Tested using a fresh vite deployment
main.ts
`import './style.css'
import { fromFile } from '@capsizecss/unpack';
import font from './font.woff2';
const metrics = await fromFile(font);
console.log('font metrics', metrics)`
package.json
{ "name": "capsize", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "tsc && vite build", "preview": "vite preview" }, "devDependencies": { "typescript": "^5.2.2", "vite": "^5.1.0" }, "dependencies": { "@capsizecss/unpack": "^1.0.0" } }
Error
` VITE v5.1.1 ready in 194 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
X [ERROR] No matching export in "node_modules/fontkit/dist/browser-module.mjs" for import "default"
PS - Awesome project! I ended up using the GH site to upload fonts & then lift the metrics from there & they worked absolutely perfectly.
The text was updated successfully, but these errors were encountered: