Open janaka opened 2 years ago
I uncounted the same err.
I import the remark-slate with:
const slate = require('remark-slate');
Then resolve the error with:
unified()
.use(remarkParse)
.use(slate.default)
@woodpeng interesting, is this an issue with how I'm distributing the module? If so that sounds like an easy fix
Since my project using CommonJs instead of ESM, I have to use 'require' to import the module. I am not sure whether this change caused the err, then have to add the '.default' to make it work.
I too am receiving the Cannot `process` without `Compiler`
. I've imported remark-slate
, as part of an ESM. And using the .default
trick prevents the error from being thrown but my export remains in Markdown.
await unified().use(remarkParse).use(remarkSlate.default).process('[my link](https://github.com)');
Any thoughts?
Hi, Thanks for everybody's efforts on this project.
I've been having issues getting it to work on NodeJS and all things point to the issue being with remark-slate with Node. The same code worked fine in the browser within a React app. I want to use this on the backend to handle read/write from markdown persistence.
I've tried debugging myself but haven't made much progress. I've also tried different versions of dependencies with no luck.
Seems like somebody else has had issues trying to use for a similar use case. See thread here.
fwiw I seem to be making a bit more progress with
remark-slate-transformer
.Any ideas?
Much appreciated.
My test code
The error thrown by Unified. node_modules/unified/lib/index.js:520 the assertCompiler function.
with ESM + Typescript