Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'hast-util-to-html' in v16.0.0
#40
Closed
4 tasks done
Labels
v16.0.0
#40
Initial checklist
Affected packages and versions
v16.0.0
Link to runnable example
No response
Steps to reproduce
Hello, I'm learning Javascript/React/Next.js and I am following the foundation course from Next.js documentation (a.k.a. I'm a very inexperienced js developer, so it's very likely that the issue in on my side).
I was following this part of the tutorial to render markdown pages to html using
remark-htlm
, but when I tried, Next.js failed to render the page and I got this error:I checked the
package.json
forv16.0.0
and it looks liktehast-util-to-html
has been moved fromdependencies
todevDependencies
(07cd479). As a matter of fact, I tried to downgraderemark-html
tov15.0.2
and the error disappeared.General Info
Non-working
package.json
Working
package.json
Expected behavior
Markdown is rendered successfully by
remark-html
Actual behavior
remark-html
throws an error due to a missing dependency forhast-util-to-html
Runtime
Other (please specify in steps to reproduce)
Package manager
Other (please specify in steps to reproduce)
OS
Linux
Build and bundle tools
Next.js
The text was updated successfully, but these errors were encountered: