ElemeFE / ElemeFE/element-react

react 的升级版 next.js 上使用 element-ui 报错

Open
#797 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.8k
Forks
435
PR merge metrics
No merged PRs in 30d

Description

### Description

引入模块的时候就开始报错:
`ReferenceError: window is not defined
at D:\project\dapp\dpark-react\node_modules\element-react\dist\npm\es5\libs\utils\popper.js:57:16
at root (D:\project\dapp\dpark-react\node_modules\element-react\dist\npm\es5\libs\utils\popper.js:48:26)
at Object. (D:\project\dapp\dpark-react\node_modules\element-react\dist\npm\es5\libs\utils\popper.js:53:3)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (D:\project\dapp\dpark-react\node_modules\element-react\dist\npm\es5\libs\utils\popper-mixins.js:18:15)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)`

### Reproduce Steps

1. [First Step]
2. [Second Step]
3. [and so on...]

### Error Trace (if possible)

It's better to post up the error stack for us to trace this issue.

### Solution

What needs to be done to address this issue? Ideally, provide a pull request with a fix.

### Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.