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)
4 Replies
Solidor
SolidorOP2y 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
TyphonJS (Michael)
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
Solidor
SolidorOP2y 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
TyphonJS (Michael)
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