-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Reproduction
StackBlitz - https://stackblitz.com/~/github.com/Vishal17199/remix-test?file=app/routes/_index.tsx
git repo - https://github.com/Vishal17199/remix-test
- created new project with vite and remix
- Install @uiw/react-markdown-editor
- Add import statement for '@uiw/react-markdown-editor' and use in app/routes/_index.tsx
- facing error message Cannot use import statement outside a module
System Info
System:
OS: macOS 13.5
CPU: (8) arm64 Apple M1 Pro
Memory: 98.05 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.0.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.6.4 - /usr/local/bin/npm
Browsers:
Chrome: 125.0.6422.141
Safari: 16.6
npmPackages:
@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
Used Package Manager
npm
Expected Behavior
Markdown editor should work fine
Actual Behavior
Getting below error
Cannot use import statement outside a module
at new AsyncFunction ()
at instantiateModule (file:///Users/vishal/Documents/test/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:56228:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5
Click outside, press Esc key, or fix the code to dismiss.
You can also disable this overlay by setting server.hmr.overlay to false in vite.config.ts.
