Closed yelnyafacee closed 3 years ago
Hi, sorry that I did not document that I used styled component as peer dependency. Solve this by npm install styled-components --save
I am getting this error now:
Server Error
Error: The id is required to use Aditor
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Source
pages\_document.tsx (89:33) @ Function.getInitialProps
87 | }
88 |
> 89 | const { html, head } = await ctx.renderPage({ enhanceApp })
| ^
90 | const styles = [...flush()]
91 | return { html, head, styles }
92 | }
Hi there, add the id to your Aditor.
<Aditor id="aditor" defaultValue={value} onChange={value=>{
setValue(value);
}} />
We solved this already.
Failed to compile ./node_modules/aditor/dist/index.modern.js:4:0 Module not found: Can't resolve 'styled-components' null