Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Error - when project is within nested folder - Error: Expected a backslash preceding the semicolon. #959

Closed
jwarykowski opened this issue Oct 3, 2023 · 3 comments
Labels
Package: react-email This is the CLI we generally use as just `email` on the temrinal. Type: Bug Confirmed bug

Comments

@jwarykowski
Copy link
Contributor

Describe the Bug

If you have your app within a nested folder e.g apps, when running yarn dev the application fails to compile with the following error:

./src/styles/globals.css.webpack[javascript/auto]!=!../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[2].oneOf[13].use[2]!../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[2].oneOf[13].use[3]!./src/styles/globals.css
Error: Expected a backslash preceding the semicolon.
    at resolveMatches.next (<anonymous>)
    at Function.from (<anonymous>)
    at runMicrotasks (<anonymous>)

Note if I pull the files into the root folder it works as expected.

Which package is affected (leave empty if unsure)

No response

Link to the code that reproduces this issue

https://github.com/jwarykowski/react-email-nested-folder-issue

To Reproduce

  1. Download repo highlighted above
  2. Navigate into apps folder
  3. Run yarn && yarn dev
  4. Fails to compile and error above appears

Expected Behavior

Application bundles as expected

What's your node version? (if relevant)

v16.10.0

@jwarykowski jwarykowski added the Type: Bug Confirmed bug label Oct 3, 2023
@gabrielmfern gabrielmfern added the Package: react-email This is the CLI we generally use as just `email` on the temrinal. label Nov 10, 2023
@gabrielmfern
Copy link
Collaborator

gabrielmfern commented Jan 25, 2024

Seems like the repro isn't public anymore. Sorry for taking so long to look at this one.
If you can make another one it'd be awesome!

@jwarykowski
Copy link
Contributor Author

Hey @gabrielmfern, sorry, I've changed the visibility. I accidentally set this repo as private. If you can take another look that would be greatly appreciated.

@gabrielmfern
Copy link
Collaborator

So this works properly with our now [email protected], if you didn't know about it here's the blog post https://resend.com/blog/react-email-2.

Here are the steps if you want to get this running properly on the env you provided:

  1. Delete yarn.lock (had a few issues without this)
  2. Add the following to your package.json:
      "resolutions": {
        "strip-ansi": "^6.0.1"
      }
    From ESLint Error: when installed with yarn yarnpkg/yarn#8976 (comment)
  3. Run yarn add react-email@latest

Will close this as completed as it seems to be fixed as of the latest. If this still happens let me know and I'll reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: react-email This is the CLI we generally use as just `email` on the temrinal. Type: Bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants