Skip to content

Import aliases broken #2582

@l0gicgate

Description

@l0gicgate

Describe the Bug

After updating from 4.2.12 to 4.3.1 I am getting the following errors now and the dev server crashes.

Downgrading to 4.2.12 fixes the issue.

Could not find file at /home/<redacted>/Documents/github/<redacted>/src/utils/react-email.utils
[Error: ENOENT: no such file or directory, open '/home/<redacted>/Documents/github/<redacted>/src/utils/react-email.utils'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/<redacted>/Documents/github/<redacted>/src/utils/react-email.utils'
}

Example imports:

import type { PropsWithChildren } from 'react';

import { Body, Container, Head, Html, Img } from '@react-email/components';

import { imageUrl } from '@/utils/react-email.utils';

Which package is affected (leave empty if unsure)

react-email

Link to the code that reproduces this issue

https://github.com/resend/react-email

To Reproduce

Use aliased imports in a react/typescript project.

Expected Behavior

It should work like it did in 4.2.12

What's your node version? (if relevant)

24.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: react-emailThis is the CLI we generally use as just `email` on the temrinal.Type: BugConfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions