T
TyphonJSSolidor

Error building after updating to TRL 0.1.1

Recently updated the TITAN system to TRL 0.1.1, but when I npm run build it errors out. Not sure why.
[commonjs--resolver] Missing "./svelte/store" specifier in "@typhonjs-fvtt/runtime" package
error during build:
Error: Missing "./svelte/store" specifier in "@typhonjs-fvtt/runtime" package
at e (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:21416:25)
at n (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:21416:627)
at o (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:21416:1297)
at resolveExportsOrImports (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:28708:20)
at resolveDeepImport (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:28727:31)
at tryNodeResolve (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:28415:20)
at Object.resolveId (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:28176:28)
at file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/rollup/dist/es/shared/node-entry.js:25356:40
at async PluginDriver.hookFirstAndGetPlugin (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/rollup/dist/es/shared/node-entry.js:25256:28)
at async resolveId (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/rollup/dist/es/shared/node-entry.js:23931:26)
[commonjs--resolver] Missing "./svelte/store" specifier in "@typhonjs-fvtt/runtime" package
error during build:
Error: Missing "./svelte/store" specifier in "@typhonjs-fvtt/runtime" package
at e (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:21416:25)
at n (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:21416:627)
at o (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:21416:1297)
at resolveExportsOrImports (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:28708:20)
at resolveDeepImport (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:28727:31)
at tryNodeResolve (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:28415:20)
at Object.resolveId (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:28176:28)
at file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/rollup/dist/es/shared/node-entry.js:25356:40
at async PluginDriver.hookFirstAndGetPlugin (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/rollup/dist/es/shared/node-entry.js:25256:28)
at async resolveId (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/rollup/dist/es/shared/node-entry.js:23931:26)
S
Solidor277d ago
My package.json looks like this:
{
"name": "titan",
"description": "Provides a bare-bones Foundry System for TITAN.",
"license": "MIT",
"private": true,
"type": "module",
"author": "Solidor",
"imports": {
"#runtime/*": "@typhonjs-fvtt/runtime/*",
"#standard/*": "@typhonjs-fvtt/svelte-standard/*"
},
"dependencies": {
"@typhonjs-fvtt/runtime": "^0.1.1",
"@typhonjs-fvtt/svelte-standard": "^0.1.0",
"dracula-ui": "^1.0.6",
"svelte": "^4.1.2",
"tippy.js": "^6.3.7",
"uuid": "^9.0.0"
},
"devDependencies": {
"@typhonjs-config/eslint-config": "^0.6.0",
"@typhonjs-fvtt/eslint-config-foundry.js": "^0.8.0",
"eslint": "^8.46.0",
"svelte-preprocess": "^5.0.4",
"vite": "^4.4.8"
},
"browserslist": [
">5%",
"not IE 11"
],
"scripts": {
"build": "vite build",
"dev": "vite",
"eslint": "eslint ."
}
}
{
"name": "titan",
"description": "Provides a bare-bones Foundry System for TITAN.",
"license": "MIT",
"private": true,
"type": "module",
"author": "Solidor",
"imports": {
"#runtime/*": "@typhonjs-fvtt/runtime/*",
"#standard/*": "@typhonjs-fvtt/svelte-standard/*"
},
"dependencies": {
"@typhonjs-fvtt/runtime": "^0.1.1",
"@typhonjs-fvtt/svelte-standard": "^0.1.0",
"dracula-ui": "^1.0.6",
"svelte": "^4.1.2",
"tippy.js": "^6.3.7",
"uuid": "^9.0.0"
},
"devDependencies": {
"@typhonjs-config/eslint-config": "^0.6.0",
"@typhonjs-fvtt/eslint-config-foundry.js": "^0.8.0",
"eslint": "^8.46.0",
"svelte-preprocess": "^5.0.4",
"vite": "^4.4.8"
},
"browserslist": [
">5%",
"not IE 11"
],
"scripts": {
"build": "vite build",
"dev": "vite",
"eslint": "eslint ."
}
}
Figured it out. I needed to update my Vite.config
TM
TyphonJS (Michael)277d ago
No worries... I see you have the uuid package as a dependency. Can you describe your use of uuid? There is a minimal / uuidv4 implementation that is in TRL that is much smaller / more or less unique available via:
import { Hashing } from '#runtime/util';

Hashing.uuidv4();
import { Hashing } from '#runtime/util';

Hashing.uuidv4();
https://typhonjs-fvtt-lib.github.io/api-docs/classes/_runtime_util.Hashing.html#uuidv4
S
Solidor277d ago
Mostly I use it when working with array objects, so that I can reference a specific item in the array by its UUID. But if TRL already has something included I could try that
TM
TyphonJS (Michael)277d ago
You might take a quick gander and see the difference in the index.js / build size as well. Just curious about that. The uuid package is pretty big.
Want results from more Discord servers?
Add your server
More Posts
TJSApplication Character Sheet odd behavior with unlinked tokensHas anyone else experienced weird when using a TJSApplication as a character sheet with unlinked tokTJSDocumentCollection best practices?Hi! I've got a little component I'm using whose purpose is basically to just show a tiny preview of Release `TRL 0.1.1` - Patch releaseGreets @FVTT ▹ Developer! I have just released a patch / fix release that fixes a small oversight iUncaught TypeError: $storeElementRoot is undefinedHi! Encountering the following error when trying to resize an application based on a TJSApplicationSPopcorn InitiativeJust opening a forum post to track @gerark progress w/ TRL & Svelte + an initial idea of implementinToken Action HUDLet's continue chatting about TAH here to keep track of discussion @larkinaboutPostcssConfig seem not workin with 0.1.0@mleahy sorry to bother i'm trying to use the postccs feature of the @typhonjs-fvtt/runtime on the TJSDocument for aggregating actor flags for Svelte ComponentI'm sure this is very simple, but I'm having a hard time understanding how to get this to work. MaybUpdate to ChatMessage outside of Svelte doesn't trigger reactivity on linked TJSDocumentI'm a bit confused about this... 1. When I render a ChatMessage via svelte, in the chat message sveRelease `TRL 0.1.0` - The journey to beta begins...Greets @FVTT ▹ Developer, I am very excited to announce the release of TRL `0.1.0`. This is a majorHow do I get the elementRoot of a ChatMessage?SvelteApplication provides `elementRoot` prop to components that implement it, which is very useful.Getting started with the GUI and understanding element rootIt's been a while, but I've been working on my Knowledge Recalled module since V11 is out, and my fr