thetarnav/solid-devtools

Overlay not work

Farnsi opened this issue ยท 4 comments

It shows only: ReferenceError: Cannot access 'container9' before initialization

Does it work with@solidjs/router and lazy loaded components?

image

Chrome version 111.0.5563.146
Linux Mint 21.1

What can i do to ship more/better details?

Thanks for the reports ๐Ÿ™
Could you include your dependency versions? (solid, router)

Same error:

@solidjs/router: ^0.8.2
solid-js: v1.7.0
vite-plugin-solid: v2.7.0

Though I am attempting to use in Electron.

Same issue after updating.

@solid-devtools/overlay 0.6.0 
solid-js 1.7.5
vite-plugin-solid 2.7.0

image

let declarations are not hoisted...

This file is generated by vite.

This is how the source code was written:

const containerSize = createElementSize(() => container)
const expandable = () => (containerSize.height ?? 0) > rem() * styles.MIN_PATH_HEIGHT_IN_REM
const path = createMemo(() => {
const node = structure.inspectedNode()
return node ? structure.getNodePath(node) : []
})
let container!: HTMLDivElement

The problem might be that createElementSize used to call target in onMount, but now immediately:

solidjs-community/solid-primitives@2f6d373#diff-7b7a1aa744c704ff1f8a484e16ecc05716c8f6229ded8e7d5d3b2cd5606e18c5L210-L215

EDIT: #225 will fix this.