Coder Social home page Coder Social logo

Tests not passing about grunge-stack HOT 8 CLOSED

remix-run avatar remix-run commented on April 17, 2024 2
Tests not passing

from grunge-stack.

Comments (8)

salper avatar salper commented on April 17, 2024

I've been using remix for a while now, and the Buffer is not defined issue has been there since the unstable_* multipart feature. Curiously, the unstable_parseMultipartFormData, which relies on busboy (calling Buffer) is bundled in the client dist while not being used at all in the routes, so something must be wrong in the esbuild config.

from grunge-stack.

salper avatar salper commented on April 17, 2024

What's weird is that unstable_createMemoryUploadHandler is bundled when unstable_createFileUploadHandlerfrom is not, so that could be a clue.

from grunge-stack.

joaogomesdev avatar joaogomesdev commented on April 17, 2024

Yeah, it's weird because I literally just cloned and installed the dependencies. And then I run the tests and they don't work

from grunge-stack.

salper avatar salper commented on April 17, 2024

Just dug into it. What I've found is that a simple rm -rf public/build && npm run build:remix seems to clear the issue, as the client bundle seems clean after that, so I wonder if it's not the remix-init of the stack that's doing something differently. Trying to confirm that for now.

from grunge-stack.

salper avatar salper commented on April 17, 2024

As said earlier, the problem has been there since the introduction of the multipart feature (don't know why I've said it could be the remix-init of the stack 🤭 ). I've tried on a baremetal install (architect+typescript), and the issue occurs between the remix watch and the remix build:

  • remix build -> client bundle is clean
  • remix watch -> client bundle has occurrences of unstable_createMemoryUploadHandler

from grunge-stack.

salper avatar salper commented on April 17, 2024

Ah! Ah! It's actually normal to have occurrences of unstable_createMemoryUploadHandler in the baremetal build folder, as it's due to the source map generation (didn't see the file extension 😱 ). So the client warning could actually be due to the stack setup, as I do have an occurence in a generated js chunk using remix watch and not remix build using the grunge stack.

from grunge-stack.

salper avatar salper commented on April 17, 2024

I think I've got something now. Commenting the routes entry in the remix.config.js provides a clean browser build. It makes sense as the cypress/support/test-routes/create-user.ts is included via the routes attribute only when process.env.NODE_ENV is not production. So my first guess is that routes included via the routes entry are not pruned (or tree shaken) properly, and remix is fully loaded inside (routes entry commented, the chunk is only 176K while not commented, the chunk weighs 1.1M).

from grunge-stack.

joaogomesdev avatar joaogomesdev commented on April 17, 2024

Thanks you very much @salper for the reply!

from grunge-stack.

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.