Yilmaz
Yilmaz

Reputation: 49521

TypeError: (0 , import_jsx_dev_runtime.jsxDEV) is not a function

I am testing s remix.run app to see how it works.

I created a posts page inside routes directory

const Posts = () => {
  
  return (
    <main>
     testing
    </main>
  );
};

I get this error on console:

TypeError: (0 , import_jsx_dev_runtime.jsxDEV) is not a function 2ms
    at /home/Documents/remix/my-remix-app/app/entry.server.jsx:82:7
    at new Promise (<anonymous>)
    at handleBrowserRequest (/home/Documents/remix/my-remix-app/app/entry.server.jsx:78:10)
    at handleRequest (/home/Documents/remix/my-remix-app/app/entry.server.jsx:23:7)
    at handleDocumentRequestRR (/home/Documents/remix/my-remix-app/node_modules/@remix-run/server-runtime/dist/server.js:260:20)
    at requestHandler (/home/Documents/remix/my-remix-app/node_modules/@remix-run/server-runtime/dist/server.js:49:18)
    at /home/Documents/remix/my-remix-app/node_modules/@remix-run/express/dist/server.js:39:22

On browser I see

 Unexpected Server Error

Upvotes: 2

Views: 6366

Answers (2)

jckmlczk
jckmlczk

Reputation: 622

You could add build and public/build catalogs to your .dockerignore file, as stated here https://github.com/remix-run/remix/issues/4081#issuecomment-1490389381

Upvotes: 0

Daksh
Daksh

Reputation: 489

This is an active issue on the official remix repository. A few fixes suggested by users:

  1. Adding remix build to dev script in package.json:
"dev": "remix build && run-p dev:*"
  1. Forcefully bumping esbuild version to ^0.15.8.

  2. Reverting @remix-run/dev to 1.6.8.

Upvotes: 2

Related Questions