Shay Rosenfeld
Shay Rosenfeld
Explore posts from servers
FFilament
Created by Shay Rosenfeld on 3/3/2025 in #❓┊help
Using json properties for form schema
I have a form that uses a model on laravel with a json column. Inside there are some properties. There are tags and difficulty level inside but when saving, it overwrites the whole json instead of just changing the correct property. A simple example of a json column value (column name is metadata):
{
"tags": [
"Beauty & Health",
"Health Care",
"Massage & Relaxation",
"Physiotherapy",
"Acupressure",
"Reflexology",
"Acupressure Socks",
"Massage Socks",
"Foot Massager"
],
"difficulty": {
"level": 42
},
...restProperties
}
{
"tags": [
"Beauty & Health",
"Health Care",
"Massage & Relaxation",
"Physiotherapy",
"Acupressure",
"Reflexology",
"Acupressure Socks",
"Massage Socks",
"Foot Massager"
],
"difficulty": {
"level": 42
},
...restProperties
}
The TagsInput and the TextInput I use work, and it saves, but then the metadata column is becoming only tags and difficulty. The form components part of the schema:
TagsInput::make('metadata.tags')
->separator(',')
->splitKeys(['Tab', 'Enter', ',']),

TextInput::make('metadata.difficulty.level')
->type('number')
->minValue(1)
->maxValue(100),
TagsInput::make('metadata.tags')
->separator(',')
->splitKeys(['Tab', 'Enter', ',']),

TextInput::make('metadata.difficulty.level')
->type('number')
->minValue(1)
->maxValue(100),
Obviously I am doing something wrong, but I can't find something in the docs relating to that.
2 replies
NNuxt
Created by Shay Rosenfeld on 11/9/2024 in #❓・help
Build does not create index.mjs
Hi. I am having a strange problem. Made some changes (added nuxt scripts) to my SSR, but now after building using npm run build, the file .output/server/index.mjs is not being created, which leads to failure on pm2 side. This is the first time this happening with this app and it's super strange. Versions: Nuxt 3.13.2 with Nitro 2.9.7. Relevant files of nuxt.config.tx, ecosystem.config.cjs and package.json can be found here (was too long for the message): https://pastebin.com/acsTNTNy Any help would be super appreciated 🙂
5 replies
NNuxt
Created by Shay Rosenfeld on 3/30/2024 in #❓・help
Error with Worker after upgrading to 3.11
Hi. I tried to upgrade to 3.11 from 3.9.3, using the usual method with npx nuxi upgrade --force. However, after Nuxt loads vite and nitro, I get the following error:
ERROR [worker reload] [worker init] Cannot read properties of undefined (reading 'handler') 9:31:45 PM

at normalizeLayer (node_modules/h3/dist/index.mjs:2025:15)
at use (node_modules/h3/dist/index.mjs:1935:20)
at Object.use (node_modules/h3/dist/index.mjs:1908:32)
at createNitroApp (node_modules/nitropack/dist/runtime/app.mjs:125:9)
at <anonymous> (node_modules/nitropack/dist/runtime/app.mjs:151:25)
at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:66:12)
ERROR [worker reload] [worker init] Cannot read properties of undefined (reading 'handler') 9:31:45 PM

at normalizeLayer (node_modules/h3/dist/index.mjs:2025:15)
at use (node_modules/h3/dist/index.mjs:1935:20)
at Object.use (node_modules/h3/dist/index.mjs:1908:32)
at createNitroApp (node_modules/nitropack/dist/runtime/app.mjs:125:9)
at <anonymous> (node_modules/nitropack/dist/runtime/app.mjs:151:25)
at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:66:12)
From the stack trace it looks like the problem is with nitro modules, but I am pretty sure it's something else (as it is usually with these errors in my experience), however I can't really see a way to debug this. Any help would be appreciated 🙂
1 replies