You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use suneditor-react in my react SSR project.
import React, {Components} from "react";
import { Input, Switch , Select, DatePicker } from 'antd';
import { CloseOutlined, CheckOutlined} from '@ant-design/icons';
import moment from 'moment'
import SunEditor from 'suneditor-react';
import 'suneditor/dist/css/suneditor.min.css'
class EditComponent extends Components{
render(){
return(
<div>
<p> My Other Contents </p>
if (typeof window !== 'undefined') {
React.render(<SunEditor lang="en" />
, document.getElementById("root"))
}
</div>
)
}
}
But unfortunately, I have faced the following problem:
D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:11609
_d: document,
^
ReferenceError: document is not defined
at Module. (D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:11609:9)
at webpack_require (D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:21:30)
at D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:85:18
at Object. (D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:88:10)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at require (internal/modules/cjs/helpers.js:77:18)
Morning,
I haven't tested yet. But I tried to reopen the issue as per your request.
If any issues I will let you know
Thanks
--
Sent from Mail.ru app for Android Friday, 04 September 2020, 07:46AM +02:00 from JiHong.Lee notifications@github.com :
@ulantiger This issue is not resolved?
Please show me a error code and environment.
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub , or unsubscribe .
Hello ππ»ββοΈ,
I am trying to use suneditor-react in my react SSR project.
But unfortunately, I have faced the following problem:
D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:11609
_d: document,
^
ReferenceError: document is not defined
at Module. (D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:11609:9)
at webpack_require (D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:21:30)
at D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:85:18
at Object. (D:\softest\reactjs\ssr\node_modules\suneditor-react\dist\main.js:88:10)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at require (internal/modules/cjs/helpers.js:77:18)
Environment: Node v12.16.3, Npm 6.14.4,
packages used:
"dependencies": {
"antd": "^4.4.3",
"axios": "^0.19.2",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"html-minifier": "^4.0.0",
"moment": "^2.27.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-html-parser": "^2.0.2",
"react-quill": "^1.3.5",
"react-router-dom": "^5.1.2",
"sqlite3": "^5.0.0",
"suneditor-react": "^2.13.1"
},
"devDependencies": {
"razzle-plugin-scss": "^3.1.5",
"razzle": "latest"
}
The text was updated successfully, but these errors were encountered: