Skip to content

charlie: fix bad build path #332

Description

@shellscape

This PR #313 made changes to the build path for windows compatibility. However, that seems to have introduced a bug.

Observe the console output below:

computer ⬡ v20: ~/code/forks/email-project-2                                                                                
→ ls -aln
total 16
drwxr-xr-x  7 502 20  224 Oct 27 13:38 .
drwxr-xr-x 63 502 20 2016 Oct 27 13:38 ..
-rw-r--r--  1 502 20  184 Oct 27 13:38 .gitignore
-rw-r--r--  1 502 20   18 Oct 27 13:38 README.md
-rw-r--r--  1 502 20  434 Oct 27 13:38 package.json
drwxr-xr-x  3 502 20   96 Oct 27 13:38 templates
-rw-r--r--  1 502 20  623 Oct 27 13:38 tsconfig.json
                                                                                                                            
computer ⬡ v20: ~/code/forks/email-project-2                                                                                
→ pnpm i

   ╭──────────────────────────────────────────╮
   │                                          │
   │   Update available! 10.15.0 → 10.19.0.   │
   │   Changelog: https://pnpm.io/v/10.19.0   │
   │     To update, run: pnpm self-update     │
   │                                          │
   ╰──────────────────────────────────────────╯

Packages: +436
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 515, reused 98, downloaded 338, added 436, done
 WARN  Issues with peer dependencies found
.
└─┬ jsx-email 2.7.7
  ├─┬ @radix-ui/react-popover 1.1.2
  │ └─┬ react-remove-scroll 2.6.0
  │   ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.2.0
  │   └── ✕ unmet peer @types/react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.2.2
  ├─┬ framer-motion 11.12.0
  │ ├── ✕ unmet peer react@^18.0.0: found 19.2.0
  │ └── ✕ unmet peer react-dom@^18.0.0: found 19.2.0
  └─┬ md-to-react-email 5.0.4
    └── ✕ unmet peer react@18.x: found 19.2.0

dependencies:
+ jsx-email 2.7.7

devDependencies:
+ @types/react 19.2.2
+ react 19.2.0
+ react-dom 19.2.0
+ typescript 5.9.3

╭ Warning ───────────────────────────────────────────────────────────────────────────────────╮
│                                                                                            │
│   Ignored build scripts: @parcel/watcher, esbuild.                                         │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.   │
│                                                                                            │
╰────────────────────────────────────────────────────────────────────────────────────────────╯

Done in 5.9s using pnpm v10.15.0
                                                                                                                            
computer ⬡ v20: ~/code/forks/email-project-2                                                                                
→ which jsx-email
jsx-email not found
                                                                                                                            
computer ⬡ v20: ~/code/forks/email-project-2                                                                                
→ which email
./node_modules/.bin/email
                                                                                                                            
computer ⬡ v20: ~/code/forks/email-project-2                                                                                
→ email --version
jsx-email v2.7.6

                                                                                                                            
computer ⬡ v20: ~/code/forks/email-project-2                                                                                
→ email preview

jsx-email v2.7.6

The jsx-email CLI. Build, Check, Create and View email templates

Usage
  $ email [...options]

Commands
  build       <template file or dir path>
  check       <template file path>
  create      <template name>
  help        [<command>]
  preview     <templates dir path>

Options
  --help      Displays this message
  --version   Displays the current jsx-email version

Examples
  $ email
  $ email --help
  $ email build ./src/emails
  $ email check ./src/emails/Batman.tsx
  $ email create invite
  $ email preview ./src/emails

                                                                                                                            
computer ⬡ v20: ~/code/forks/email-project-2                                                                                
→ ls
README.md  node_modules  package.json  pnpm-lock.yaml  templates  tsconfig.json
                                                                                                                            
computer ⬡ v20: ~/code/forks/email-project-2                                                                                
→ email preview templates
[13:39:26]  info  Found 1 file:
[13:39:26]  info     /Users/code/forks/email-project-2/templates/email.tsx 

[13:39:26]  info  Starting build...
Error: Cannot find module '/private/var/folders/private/var/folders/07/ywbfgwc57_z4yx4m8vzhr8580000gp/T/jsx-email/build/email-PBL3SG6F.js' imported from /Users/code/forks/email-project-2/node_modules/.pnpm/jsx-email@2.7.7_@jsx-email+plugin-inline@1.0.1_@jsx-email+plugin-minify@1.0.2_@jsx-emai_318aafe50f9d335becf946147a15dd12/node_modules/jsx-email/dist/esm/cli/commands/build.mjs
    at finalizeResolution (node:internal/modules/esm/resolve:283:11)
    at moduleResolve (node:internal/modules/esm/resolve:952:10)
    at defaultResolve (node:internal/modules/esm/resolve:1188:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:642:12)
    at ModuleLoader.#cachedDefaultResolve (node:internal/modules/esm/loader:591:25)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:574:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:236:38)
    at ModuleLoader.import (node:internal/modules/esm/loader:539:34)
    at defaultImportModuleDynamicallyForModule (node:internal/modules/esm/utils:215:31)
    at importModuleDynamicallyCallback (node:internal/modules/esm/utils:254:12)
                                                                                    

Please triage before opening a PR

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions