Giter Club home page Giter Club logo

Comments (5)

Vishal17199 avatar Vishal17199 commented on August 24, 2024

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.

arvigeus avatar arvigeus commented on August 24, 2024

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.

Vishal17199 avatar Vishal17199 commented on August 24, 2024

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.

arvigeus avatar arvigeus commented on August 24, 2024

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.

Vishal17199 avatar Vishal17199 commented on August 24, 2024

no @arvigeus I am not using remix-utils so not sure about it.

from remix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.