kiliman / remix-express-vite-plugin

This package includes a Vite plugin to use in your Remix app. It configures an Express server for both development and production using TypeScript.
130 stars 9 forks source link

Quite some issues during local development when using with Epic Stack - What is needed? #27

Closed DennisKraaijeveld closed 5 months ago

DennisKraaijeveld commented 5 months ago

Hi!

So I am running into some recurring issues during local development. I am not sure what you would need, since I would only have screenshots with the stack trace for now. But most of the issues seem to be related to Vite and reloading/optimising dependencies. Every time a page loads and it does optimise the deps, the page will go blank and the page will not load anymore.

Two other errors I am running into since switching to this plugin:

Screenshot 2024-06-08 at 15 44 05 Screenshot 2024-06-04 at 22 06 56

The first one seem to be related to this line:

         const entryModule = module?.ssrModule?.entry.module;
                    if (entryModule === undefined) {
                        return next();
                    }

Did add a ? behind entry for now which fixes this I guess.

My question: Do you see the same in your local running examples, or would you need a repo for this?

jonathanprozzi commented 5 months ago

Hello!

We started noticing this issue at the end of last week as well. We've been using this plugin for about ~2 weeks now and are only now noticing issues with Vite reloading/optimizing dependencies until Friday/today.

Going to dig in a bit more on our end to see what we may have changed -- was looking into this and found this issue.

We're seeing the same errors that you are @DennisKraaijeveld

Thanks again @kiliman -- the plugin is really amazing and solved a core issue we were facing!

I'll post any information that can be helpful but wanted to quickly comment that we're seeing the same error.

We're using "vite": "^5.1.0",

(...)node_modules/.pnpm/remix-express-dev-server@0.2.7_@remix-run+dev@2.9.2_@remix-run+react@2.9.2_react-dom@18.3.1_r_4lvz5sxu5injnr2ndoc56px33u/node_modules/remix-express-dev-server/dist/index.js:50
                    const entryModule = module?.ssrModule?.entry.module;
                                                                ^

TypeError: Cannot read properties of undefined (reading 'module')
    at (...)/node_modules/.pnpm/remix-express-dev-server@0.2.7_@remix-run+dev@2.9.2_@remix-run+react@2.9.2_react-dom@18.3.1_r_4lvz5sxu5injnr2ndoc56px33u/node_modules/remix-express-dev-server/dist/index.js:50:65
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.11.0
kiliman commented 5 months ago

Fixed in v0.4.0

jonathanprozzi commented 5 months ago

Thank you so much @kiliman ! Really loving this plugin. Greatly appreciate it!