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

Component registration warning always emitted #3179

Open
jojje opened this issue Jun 6, 2024 · 1 comment
Open

Component registration warning always emitted #3179

jojje opened this issue Jun 6, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@jojje
Copy link

jojje commented Jun 6, 2024

Description

Whenever I load or reload the "app's" browser page, Vue produces the warning:

vue.global.js:1503 [Vue warn]: Failed to resolve component: div
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. 
  at <QPage id="c2" ref="r2" key=2  ... > 
  at <QPageContainer id="c1" ref="r1" key=1  ... > 
  at <QLayout id="c0" ref="r0" key=0  ... > 
  at <App>

Reproduce

  1. put the following code in a file (test.py)
    from nicegui import ui
    ui.label("Test")
    ui.run(prod_js=False)
  2. Run the script: python test.py
  3. Open the browser console and observe the warning.

With the minified / "production" JS assets (prod_js=True) the warning isn't being produced. I assume that's simply because the logging error level is set higher than warn for "production". This issue makes it annoying to develop using non-minified JS-sources. It also indicates that there is a real issue with how nicegui is leveraging Vue for custom HTML injection, so worth investigating if you have the bandwidth.

Version information

Python 3.10.13

Package versions (clean virtual environment with only nicegui installed)

nicegui==1.4.26

aiofiles==23.2.1
aiohttp==3.9.5
aiosignal==1.3.1
annotated-types==0.7.0
anyio==4.4.0
async-timeout==4.0.3
attrs==23.2.0
bidict==0.23.1
certifi==2024.6.2
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
docutils==0.19
exceptiongroup==1.2.1
fastapi==0.109.2
frozenlist==1.4.1
h11==0.14.0
httpcore==1.0.5
httptools==0.6.1
httpx==0.27.0
idna==3.7
ifaddr==0.2.0
itsdangerous==2.2.0
Jinja2==3.1.4
markdown2==2.4.13
MarkupSafe==2.1.5
multidict==6.0.5
orjson==3.10.3
pscript==0.7.7
pydantic==2.7.3
pydantic_core==2.18.4
Pygments==2.18.0
python-dotenv==1.0.1
python-engineio==4.9.1
python-multipart==0.0.9
python-socketio==5.11.2
PyYAML==6.0.1
requests==2.32.3
simple-websocket==1.0.0
sniffio==1.3.1
starlette==0.36.3
typing_extensions==4.12.1
urllib3==2.2.1
uvicorn==0.30.1
vbuild==0.8.2
watchfiles==0.22.0
websockets==12.0
wsproto==1.2.0
yarl==1.9.4
@falkoschindler falkoschindler added the help wanted Extra attention is needed label Jun 9, 2024
@falkoschindler
Copy link
Contributor

Good point, @jojje!

I noticed these warnings a while ago, but couldn't get rid of them. And because they are usually hidden, I stopped thinking about them. But it would be create to either resolve or filter them.

Does anyone have an idea how we could tell Vue that it's fine to use <div> tags?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants