Remix + mdx-bundler, getting error ERROR: [plugin: @mdx-js/esbuild] TypeError: this.replace is not a function
See original GitHub issueRepo for repro
https://github.com/jacargentina/my-remix
npm install
remix dev
open http://localhost:3000
Write some text... clic Convert
Error
ERROR: [plugin: @mdx-js/esbuild] TypeError: this.replace is not a function
Notes
Using react 18; plus remix.config.js with serverDependenciesToBundle setting When using react 17 it worked. Maybe related to react 18?
Issue Analytics
- State:
- Created a year ago
- Comments:9
Top Results From Across the Web
var.replace is not a function - javascript - Stack Overflow
My guess is that the code that's calling your trim function is not actually passing a string to it. To fix this, you...
Read more >Why am I getting "TypeError: e.replace is not a function" using ...
Why am I getting "TypeError: e.replace is not a function" using SearchManager with eval in the search? ... new SearchManager({ id: "mysearch1", earliest_time:...
Read more >How to fix "Uncaught TypeError: x is not a function" in JavaScript
JS Casts 01 - How to fix "Uncaught TypeError : x is not a function " in JavaScript.Visit https://javascriptcasts.com/episodes/01 for a summary ...
Read more >this.replace is not a function on DataBind - jQWidgets
When i open the page (Sharepoint Webpart) i get an error: TypeError: this.replace is not a function return this.replace(/^\s+|\s+$/g, '');.
Read more >Fixing webpack error - request.replace is not a function
Fixing webpack error: TypeError: request.replace is not a function. If you try to set up multiple entry points in Webpack, you can get...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Got rid of the error by moving the function that was responsible for calling bundleMDX to a fileName.server.ts file. This is to prevent Remix from running backend code on the browser. Explanation here.
After that I got a new message
and it contained a link to how I could fix it.
I have this code at the top of my fileName.server.ts and the errors are gone. 😌
I have similar errors as @ToniMaunde.
All I want to do is to bundle some markdown inside
loader
function and then in the same file in client I want to use that markdown as component.