vue-email / nuxt

💚 Official Nuxt module for Vue Email. Build email templates with Vue components.
https://vuemail.net/getting-started/nuxt-nitro
MIT License
110 stars 3 forks source link

Unable to locate 'esbuild-linux-64' package and issues releasing .output folder independently #14

Closed vanling closed 5 months ago

vanling commented 10 months ago

I previously raised an issue at https://github.com/vue-email/nuxt/issues/11 and subsequently closed it, believing the problem originated from my deployment method via Jenkins. However, I now suspect there might indeed be an error.

15|*****-nl-website  | Error loading component Error: The package "esbuild-linux-64" could not be found, and is needed by esbuild.
15|*****-nl-website  | If you are installing esbuild with npm, make sure that you don't specify the
15|*****-nl-website  | "--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
15|*****-nl-website  | of "package.json" is used by esbuild to install the correct binary executable
15|*****-nl-website  | for your current platform.
15|**** |     at generateBinPath (/home/****/****.nl/releases/frontend/release-****/server/node_modules/esbuild/lib/main.js:1819:15)
15|**** |     at esbuildCommandAndArgs (/home/****/****.nl/releases/frontend/release-****/server/node_modules/esbuild/lib/main.js:1886:33)
15|**** |     at ensureServiceIsRunning (/home/****/****.nl/releases/frontend/release-****/server/node_modules/esbuild/lib/main.js:2051:25)
15|**** |     at startSyncServiceWorker (/home/****/****.nl/releases/frontend/release-****/server/node_modules/esbuild/lib/main.js:2261:19)
15|**** |     at Object.<anonymous> (/home/****/****.nl/releases/frontend/release-****/server/node_modules/esbuild/lib/main.js:2302:3)
15|**** |     at Module._compile (node:internal/modules/cjs/loader:1241:14)
15|**** |     at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
15|**** |     at Module.load (node:internal/modules/cjs/loader:1091:32)
15|**** |     at Module._load (node:internal/modules/cjs/loader:938:12)
15|**** |     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)

I am executing the build on the server and subsequently relocating the .output folder. My understanding is that this should be a feasible deployment method for Nuxt, meaning the initial node_modules should not be necessary, correct? Ideally, everything required should be contained within the build's .output.

My apologies for directly addressing you here, @danielroe. In this domain, you possess the magic wizard expertise, and I would greatly appreciate your insights on whether my approach is flawed.

Reproduction Steps:

Flowko commented 10 months ago

hi, thanks for this analysis, currently my time doesnt allow me to take a deep look at this type of issues, but will keep it open incase anyone would like to contribute in a help for this

BenWortley commented 9 months ago

I, too, am having this issue. In development, it is working fine. I pushed it to Vercel, and it just doesn't like it. However, I'm not moving my output file.

Error loading component Error: The package "esbuild-linux-64" could not be found, and is needed by esbuild.

If you are installing esbuild with npm, make sure that you don't specify the
"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
of "package.json" is used by esbuild to install the correct binary executable
for your current platform.
    at generateBinPath (/var/task/node_modules/esbuild/lib/main.js:1819:15)
    at esbuildCommandAndArgs (/var/task/node_modules/esbuild/lib/main.js:1886:33)
    at ensureServiceIsRunning (/var/task/node_modules/esbuild/lib/main.js:2051:25)
    at startSyncServiceWorker (/var/task/node_modules/esbuild/lib/main.js:2261:19)
    at Object.<anonymous> (/var/task/node_modules/esbuild/lib/main.js:2302:3)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)

And I believe because of the above error it's causing the template not to be rendered.

[nuxt] [request error] [unhandled] [500] Error rendering template ContactFormEmail: Error: Component ContactFormEmail not found
  at templateRender (./node_modules/@vue-email/compiler/dist/index.mjs:57021:11)  
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)  
  at async useCompiler (./chunks/useCompiler.mjs:21:20)  
  at async ./chunks/send-email.post.mjs:37:20  
  at async Object.handler (./chunks/nitro/vercel.mjs:3024:19)  
  at async toNodeHandle (./chunks/nitro/vercel.mjs:3213:7)  
  at async Server.<anonymous> (/opt/node-bridge/bridge-server-4GP2M4NJ.js:1:8806)
Flowko commented 5 months ago

we just merged a new project rewrite, please do check the docs and the updated logic https://vuemail.net/