GithubHelp home page GithubHelp logo

Comments (9)

felix-dolderer avatar felix-dolderer commented on August 20, 2024 3

cpojer

This is especially true for devs not using react and thus not using the emails.create / batch.create functions which depend on @react-email/render which depends on js-beautify.

I don't even use the dependency for which the sub-dependency is broken.

Would be awesome to have a flag to instantiate Resend without the create functions and thus without the @react-email/render dependency.

from resend-node.

felix-dolderer avatar felix-dolderer commented on August 20, 2024 1

Facing the same issue when trying to import resend in SvelteKit. Is there a previous version of resend that doesn't have this error?

install resend@2 there they use a different dependency

from resend-node.

socratesomiliadis avatar socratesomiliadis commented on August 20, 2024 1

If anyone wants a temporary fix you can go to your package.json file and add this bit for npm:

 "overrides": {
      "@react-email/render": "0.0.12"
    }

or if you're using pnpm:

"pnpm": {
    "overrides": {
      "@react-email/render": "0.0.12"
    }
  }

from resend-node.

vcapretz avatar vcapretz commented on August 20, 2024 1

hey there, we just released v3.1.0 with the updated @react-email/render version.
I'll close the issue now 😄

from resend-node.

ramnivas avatar ramnivas commented on August 20, 2024

Facing the same issue with the current version 3.0.0 (this one with Deno):

> import { Resend } from "npm:resend";
Uncaught SyntaxError: The requested module 'js-beautify' does not provide an export named 'html' at file:///Users/ramnivas/Library/Caches/deno/npm/registry.npmjs.org/@react-email/render/0.0.11/dist/index.mjs:49:10
    at async <anonymous>:1:41

Works fine with 2.x:

import { Resend } from "npm:resend@2";

from resend-node.

cpojer avatar cpojer commented on August 20, 2024

Same issue here.

Would it be possible to dump js-beautify or make it optional (via optional dep and try-catch a dynamic import)? It's a huuuge dependency and not needed for most use cases of resend.

from resend-node.

ITD-SKP-Project avatar ITD-SKP-Project commented on August 20, 2024

Facing the same issue when trying to import resend in SvelteKit. Is there a previous version of resend that doesn't have this error?

from resend-node.

gabrielmfern avatar gabrielmfern commented on August 20, 2024

This is happening because of an import @react-email/render had and that is fixed on the latest, the Resend SDK just needs to be updated to use the latest as well and this should go away.
Maybe overriding the installed version of @react-email/render can be a workaround for now.

from resend-node.

JustMrMendez avatar JustMrMendez commented on August 20, 2024

having the same problem on "resend": "^3.0.0",

from resend-node.

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.