svelte-grid icon indicating copy to clipboard operation
svelte-grid copied to clipboard

Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'

Open ghoshsanjoy78 opened this issue 4 years ago • 3 comments

I am using Meteor with svelte and svelte-grid. Created a basic svelte app in Meteor using

meteor create --svelte svelte-app

Then added the svelte-grid package and trying out the basic examples provided on the svelte-grid app as is. The examples don't run and I see this error in the console:

Uncaught TypeError: Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'.
    at modules.js?hash=71c1e7c3834a9eca9587e36e301bef5796f11347:3717
    at run (modules.js?hash=71c1e7c3834a9eca9587e36e301bef5796f11347:4035)
    at Array.map (<anonymous>)
    at modules.js?hash=71c1e7c3834a9eca9587e36e301bef5796f11347:5640
    at flush (modules.js?hash=71c1e7c3834a9eca9587e36e301bef5796f11347:4899)
    at init (modules.js?hash=71c1e7c3834a9eca9587e36e301bef5796f11347:5732)
    at new App (app.js?hash=550b9d077a1c5b73e5f6793625c7ca1d487840ff:353)
    at createProxiedComponent (zodern_melte-compiler.js?hash=5f4291bf5fff54fcecb5333175efadb454e8b18b:1165)
    at new ProxyComponent (zodern_melte-compiler.js?hash=5f4291bf5fff54fcecb5333175efadb454e8b18b:731)
    at new Proxy<App> (zodern_melte-compiler.js?hash=5f4291bf5fff54fcecb5333175efadb454e8b18b:831)

Any thoughts on how to fix this. The issue occurs only when running with Meteor.

ghoshsanjoy78 avatar Dec 03 '21 04:12 ghoshsanjoy78

I'm having the same issue trying to develop an Obsidian plugin. In my case the container isn't defined and that's why the ResizeObserver is failing..

jplattel avatar Feb 19 '22 12:02 jplattel

I was able to get around this by importing from source.

    import Grid from "svelte-grid/src/index.svelte";
    import gridHelp from "svelte-grid/src/utils/helper";

jacobsieberg avatar Mar 04 '22 16:03 jacobsieberg

hi all! I have the same error, in my case I use the webpack configuration for the project and not rollup, everything works fine in rollup, not in webpack, I tried this option:

import Grid from "svelte-grid/src/index.svelte";
import gridHelp from "svelte-grid/src/utils/helper";

did not help, still the same error, I also want to note that only a part of the svelte-grid files, such as index.svelte and MoveResize/index.svelte, do not build/do not load in the run-dev mode at all, hence the errors , any ideas? @JacobSieberg @jplattel

index.mjs:1699 Uncaught TypeError: Failed to execute 'observe' on 
'ResizeObserver': parameter 1 is not of type 'Element'.
    at index.mjs:1699:1
    at run (index.mjs:20:1)
    at Array.map (<anonymous>)
    at index.mjs:2101:1
    at flush (index.mjs:1329:1)
    at init (index.mjs:2197:1)
    at new App (App.svelte:379:43)
    at ./src/main.js (main.js:13:1)
    at __webpack_require__ (bootstrap:21:1)
    at startup:6:1
(anonymous) @ index.mjs:1699
run @ index.mjs:20
(anonymous) @ index.mjs:2101
flush @ index.mjs:1329
init @ index.mjs:2197
App @ App.svelte:379
./src/main.js @ main.js:13
__webpack_require__ @ bootstrap:21
(anonymous) @ startup:6
(anonymous) @ startup:6
webpackUniversalModuleDefinition @ universalModuleDefinition:7
(anonymous) @ universalModuleDefinition:10
index.mjs:1699

Uncaught (in promise) TypeError: Failed to execute 'observe' on
'ResizeObserver': parameter 1 is not of type 'Element'.
    at index.mjs:1699:1
    at run (index.mjs:20:1)
    at Array.map (<anonymous>)
    at index.mjs:2101:1
    at flush (index.mjs:1329:1)

interk0t avatar Aug 13 '23 18:08 interk0t