Nuxt.js: [element-ui] HTMLElement is not defined in start app.

Created on 29 Apr 2019  路  14Comments  路  Source: nuxt/nuxt.js

I installed it nuxt js on universal mode and install element-ui but when run npm run build and npm run start Throw error:

image

This question is available on Nuxt community (#c9129)
available soon waiting for dependency

Most helpful comment

nuxt.config.js
global.HTMLElement = typeof window === 'undefined' ? Object : window.HTMLElement

All 14 comments

This issue as been imported as question since it does not respect nuxt.js issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/nuxt.js/issues/c9129.

same here

NOTE This issue has been fixed in element-ui https://github.com/ElemeFE/element/pull/15277

The fix will be released in [email protected]

I also encountered this problem. After consulting the Element-Ui source code, I came to the conclusion that you should use a version less than 2.8.2.

package.json
"element-ui": "=2.7.2"

I have the same issue.
I have already tried different version
2.8.2
2.7.2
2.4.11 (default)

but the error still be there...

I have the same issue.
I have already tried different version
2.8.2
2.7.2
2.4.11 (default)

but the error still be there...

have this issue with 2.8.2 version.
But afer uninstall(npm uninstall element-ui) and install 2.4.11(npm install [email protected]) the problem was solved

nuxt.config.js
global.HTMLElement = typeof window === 'undefined' ? Object : window.HTMLElement

NOTE This issue has been fixed in element-ui ElemeFE/element#15277

The fix will be released in [email protected]

For users who are having this issue:

Issue fix will be released in [email protected] with ElemeFE/element#15277

For any further question, please comment in https://github.com/ElemeFE/element/issues/15261

Has ok in element-ui 2.4.6.

NOTE This issue has been fixed in element-ui ElemeFE/element#15277
The fix will be released in [email protected]

For users who are having this issue:

Issue fix will be released in [email protected] with ElemeFE/element#15277

For any further question, please comment in ElemeFE/element#15261

When is the release planned for version 2.8.3?

@arcadesso I think you may ask in element-ui repository.

I have the same issue.
I have already tried different version
2.8.2
2.7.2
2.4.11 (default)
but the error still be there...

have this issue with 2.8.2 version.
But afer uninstall(npm uninstall element-ui) and install 2.4.11(npm install [email protected]) the problem was solved

it worked for my project. thanks

it's bug ,you can use : npm install [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gary149 picture gary149  路  3Comments

mikekidder picture mikekidder  路  3Comments

vadimsg picture vadimsg  路  3Comments

mattdharmon picture mattdharmon  路  3Comments

VincentLoy picture VincentLoy  路  3Comments