Comments (5)
I'm also using Vite here, but I suspect the issue is with Remix. The Markdown editor works fine in a standalone Vite app without Remix.
Also getting this error message in StackBlitz
13:31:23 [vite] Error when evaluating SSR module virtual:remix/server-build:
|- SyntaxError: Cannot use import statement outside a module
at new AsyncFunction ()
at instantiateModule (file:///home/Vishal17199/remix-test/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:56277:28)
13:31:23 [vite] Internal server error: Cannot use import statement outside a module
at new AsyncFunction ()
at instantiateModule (file:///home/Vishal17199/remix-test/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:56277:28)
from remix.
Place the editor in Editor.client.tsx or any .client.tsx file. Example: https://github.com/arvigeus/format-code
Now there’s another issue: in that project it works, but today I tried it on a brand new project and it threw an error. It’s not the react-codemirror, it’s Remix - it was crashing on any .client.tsx file today. Latest version from the template. Does this affect you too?
from remix.
No @arvigeus , after placing the editor in Editor.client.tsx its working work me.
I am using
@remix-run/dev: ^2.9.2 => 2.9.2
@remix-run/node: ^2.9.2 => 2.9.2
@remix-run/react: ^2.9.2 => 2.9.2
@remix-run/serve: ^2.9.2 => 2.9.2
vite: ^5.1.0 => 5.2.12
Thanks for the solution.
from remix.
Do you use remix-utils
? I stumbled upon an interesting bug, but I cannot reproduce it reliably. One way to reproduce it for me was to import the editor directly in _index.tsx
page. Or to open the page with the editor on a new tab. Try this if you have such a problem.
from remix.
no @arvigeus I am not using remix-utils
so not sure about it.
from remix.
Related Issues (20)
- Error thrown while listing Headers with single-fetch response stub in production build HOT 1
- Link tag navigating to route reloads page & no network fetch calls HOT 1
- Singlefetch `Error: Unable to decode turbo-stream response from URL: <URL>` HOT 7
- No route matched Vitest + Vite HOT 1
- 404 Page Causes Infinite Reload After Using `npx create-remix@latest` HOT 9
- unstable_data response headers not set HOT 4
- useLoaderData types broken if unstable_data is conditionally used HOT 1
- `cloudflareDevProxyVitePlugin` returns error type under `NodeNext` module resolution HOT 3
- When using the onerror event on an <img> element, the event does not trigger again after a page reload HOT 2
- BUG: useId generates duplicate IDs on initial render (ssr) HOT 2
- dev server unexpectedly loads CSS when using `?inline` imports HOT 1
- Cookie Session Storage value received from root loader sometimes stale HOT 2
- [lazy route discovery]: Link component causes re-render when `discover` is not set to `none` HOT 1
- unstable_data response headers not set HOT 7
- Dev server not working properly on Safari browser
- Top Suspense fallback not work HOT 8
- request.json() / request.text() doesn't resolve when "Content-Type" header is "application/json" HOT 5
- getInternalRouterError for missing POST endpoint instead of 405 Method Not Allowed HOT 9
- Loader function not executed after redirect to same url with different search params after update to remix v2 HOT 1
- Test setup/utils files importing server module gives: Server-only module referenced by client HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remix.