Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript error after installation #1

Open
divdax opened this issue May 16, 2023 · 2 comments
Open

Javascript error after installation #1

divdax opened this issue May 16, 2023 · 2 comments

Comments

@divdax
Copy link

divdax commented May 16, 2023

Hey,

great start of a new Nova package.

After installing this package and the media library, it might be beneficial to add the media library to the composer.json file as a requirement.

My model has the basic media library setup, implementing the HasMedia trait and using InteractsWithMedia. In my resource, I use the following code:

Media::make(__('Files'), 'images')
    ->rules(['required', 'array', 'max:4'])
    ->singleMediaRules(['image', 'max:1024']),

However, I encounter an error when loading the resource create/edit page. There is no file preview or upload when I select a file. The error message states:

Sortable: `el` must be an HTMLElement, not [object Null]
(anonymous)	@	runtime-core.esm-bundler.js:226
on	@	runtime-core.esm-bundler.js:204
nn	@	runtime-core.esm-bundler.js:158
rn	@	runtime-core.esm-bundler.js:164
Lr.t.__weh.t.__weh	@	runtime-core.esm-bundler.js:2682
xn	@	runtime-core.esm-bundler.js:339
_n	@	runtime-core.esm-bundler.js:393
Promise.then (async)		
vn	@	runtime-core.esm-bundler.js:280
gn	@	runtime-core.esm-bundler.js:274
(anonymous)	@	runtime-core.esm-bundler.js:5712
Be	@	reactivity.esm-bundler.js:394
De	@	reactivity.esm-bundler.js:384
Me	@	reactivity.esm-bundler.js:355
(anonymous)	@	reactivity.esm-bundler.js:523
set	@	runtime-core.esm-bundler.js:3167
handleResourceLoaded	@	Update.vue:146
getFields	@	Update.vue:190
await in getFields (async)		
created	@	Update.vue:134
nn	@	runtime-core.esm-bundler.js:155
rn	@	runtime-core.esm-bundler.js:164
rn	@	runtime-core.esm-bundler.js:174
li	@	runtime-core.esm-bundler.js:3556
si	@	runtime-core.esm-bundler.js:3458
Uo	@	runtime-core.esm-bundler.js:7307
(anonymous)	@	runtime-core.esm-bundler.js:7219
Io	@	runtime-core.esm-bundler.js:7141
j	@	runtime-core.esm-bundler.js:5493
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
E	@	runtime-core.esm-bundler.js:5254
k	@	runtime-core.esm-bundler.js:5163
w	@	runtime-core.esm-bundler.js:5135
g	@	runtime-core.esm-bundler.js:5055
E	@	runtime-core.esm-bundler.js:5254
k	@	runtime-core.esm-bundler.js:5163
w	@	runtime-core.esm-bundler.js:5135
g	@	runtime-core.esm-bundler.js:5055
E	@	runtime-core.esm-bundler.js:5254
k	@	runtime-core.esm-bundler.js:5163
w	@	runtime-core.esm-bundler.js:5135
g	@	runtime-core.esm-bundler.js:5055
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
J	@	runtime-core.esm-bundler.js:6229
mount	@	runtime-core.esm-bundler.js:4422
t.mount	@	runtime-dom.esm-bundler.js:1606
liftOff	@	app.js:207
(anonymous)	@	edit:75

Did i miss anything?

@stepanenko3
Copy link
Owner

@divdax, thanks for your issue

I'll solve it soon

@mdeskorg
Copy link

publish config file

Hey,

great start of a new Nova package.

After installing this package and the media library, it might be beneficial to add the media library to the composer.json file as a requirement.

My model has the basic media library setup, implementing the HasMedia trait and using InteractsWithMedia. In my resource, I use the following code:

Media::make(__('Files'), 'images')
    ->rules(['required', 'array', 'max:4'])
    ->singleMediaRules(['image', 'max:1024']),

However, I encounter an error when loading the resource create/edit page. There is no file preview or upload when I select a file. The error message states:

Sortable: `el` must be an HTMLElement, not [object Null]
(anonymous)	@	runtime-core.esm-bundler.js:226
on	@	runtime-core.esm-bundler.js:204
nn	@	runtime-core.esm-bundler.js:158
rn	@	runtime-core.esm-bundler.js:164
Lr.t.__weh.t.__weh	@	runtime-core.esm-bundler.js:2682
xn	@	runtime-core.esm-bundler.js:339
_n	@	runtime-core.esm-bundler.js:393
Promise.then (async)		
vn	@	runtime-core.esm-bundler.js:280
gn	@	runtime-core.esm-bundler.js:274
(anonymous)	@	runtime-core.esm-bundler.js:5712
Be	@	reactivity.esm-bundler.js:394
De	@	reactivity.esm-bundler.js:384
Me	@	reactivity.esm-bundler.js:355
(anonymous)	@	reactivity.esm-bundler.js:523
set	@	runtime-core.esm-bundler.js:3167
handleResourceLoaded	@	Update.vue:146
getFields	@	Update.vue:190
await in getFields (async)		
created	@	Update.vue:134
nn	@	runtime-core.esm-bundler.js:155
rn	@	runtime-core.esm-bundler.js:164
rn	@	runtime-core.esm-bundler.js:174
li	@	runtime-core.esm-bundler.js:3556
si	@	runtime-core.esm-bundler.js:3458
Uo	@	runtime-core.esm-bundler.js:7307
(anonymous)	@	runtime-core.esm-bundler.js:7219
Io	@	runtime-core.esm-bundler.js:7141
j	@	runtime-core.esm-bundler.js:5493
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
E	@	runtime-core.esm-bundler.js:5254
k	@	runtime-core.esm-bundler.js:5163
w	@	runtime-core.esm-bundler.js:5135
g	@	runtime-core.esm-bundler.js:5055
E	@	runtime-core.esm-bundler.js:5254
k	@	runtime-core.esm-bundler.js:5163
w	@	runtime-core.esm-bundler.js:5135
g	@	runtime-core.esm-bundler.js:5055
E	@	runtime-core.esm-bundler.js:5254
k	@	runtime-core.esm-bundler.js:5163
w	@	runtime-core.esm-bundler.js:5135
g	@	runtime-core.esm-bundler.js:5055
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
(anonymous)	@	runtime-core.esm-bundler.js:5607
run	@	reactivity.esm-bundler.js:185
R.e.update	@	runtime-core.esm-bundler.js:5714
R	@	runtime-core.esm-bundler.js:5728
j	@	runtime-core.esm-bundler.js:5510
N	@	runtime-core.esm-bundler.js:5468
g	@	runtime-core.esm-bundler.js:5058
J	@	runtime-core.esm-bundler.js:6229
mount	@	runtime-core.esm-bundler.js:4422
t.mount	@	runtime-dom.esm-bundler.js:1606
liftOff	@	app.js:207
(anonymous)	@	edit:75

Did i miss anything?

Publish Config File

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants