You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Currently I want to use @sendgrid/mail in Bun environment but it's impossible to do it. When I import the package it fires immediately an error :
Bun version: 1.1.10
I have this error :
9:46:27 AM [vite] Error when evaluating SSR module /src/routes/api/server.ts: failed to import "@sendgrid/mail"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
9:46:27 AM [vite] Error when evaluating SSR module /src/routes/api/[...path].ts?pick=GET: failed to import "/src/routes/api/server.ts"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
[h3] [unhandled] 83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
error: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
TypeError: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
de_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/sendim-sendgrid/dist/index.js:7:4)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
[h3] [unhandled] 83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
error: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/sendim-sendgrid/dist/index.js:8:1
83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
TypeError: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/sendim-sendgrid/dist/index.js:8:1
^C
➜ dev-secours git:(main) ✗
➜ dev-secours git:(main) ✗ bun i
[0.04ms] ".env"
bun install v1.1.10 (5102a944)
+ [email protected]
3 packages installed [1.58s]
➜ dev-secours git:(main) ✗ bun dev
$ bun --bun vinxi dev --debug
vinxi v0.3.11
vinxi starting dev server
Re-optimizing dependencies because lockfile has changed
Re-optimizing dependencies because lockfile has changed (x2)
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
[BABEL] Note: The code generator has deoptimised the styling of my-app/node_modules/.vinxi/client/deps/date-fns_locale.js?v=69eb5cc6 as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of my-app/node_modules/.vinxi/client/deps/date-fns_locale.js as it exceeds the max of 500KB.
9:36:27 AM [vite] ✨ new dependencies optimized: @elysiajs/eden, @sinclair/typebox, @sinclair/typebox/errors, @sinclair/typebox/value
9:36:27 AM [vite] ✨ optimized dependencies changed. reloading
[BABEL] Note: The code generator has deoptimised the styling of my-app/node_modules/.vinxi/client/deps/date-fns_locale.js?v=6c4e3691 as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of my-app/node_modules/.vinxi/client/deps/date-fns_locale.js as it exceeds the max of 500KB.
9:36:30 AM [vite] Error when evaluating SSR module /src/routes/api/server.ts: failed to import "sendim-sendgrid"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/sendim-sendgrid/dist/index.js:7:4)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
9:36:30 AM [vite] Error when evaluating SSR module /src/routes/api/[...path].ts?pick=GET: failed to import "/src/routes/api/server.ts"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/sendim-sendgrid/dist/index.js:7:4)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
[h3] [unhandled] 83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
error: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/sendim-sendgrid/dist/index.js:8:1
83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
TypeError: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/sendim-sendgrid/dist/index.js:8:1
^C
➜ dev-secours git:(main) ✗ bun dev
$ bun --bun vinxi dev --debug
vinxi v0.3.11
vinxi starting dev server
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
^C
➜ dev-secours git:(main) ✗ bun i && bun dev
[0.04ms] ".env"
bun install v1.1.10 (5102a944)
+ [email protected]
1 package installed [2.10s]
$ bun --bun vinxi dev --debug
vinxi v0.3.11
vinxi starting dev server
Re-optimizing dependencies because lockfile has changed
Re-optimizing dependencies because lockfile has changed (x2)
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
[BABEL] Note: The code generator has deoptimised the styling of my-app/node_modules/.vinxi/client/deps/date-fns_locale.js?v=a6f66887 as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of my-app/node_modules/.vinxi/client/deps/date-fns_locale.js as it exceeds the max of 500KB.
9:42:39 AM [vite] ✨ new dependencies optimized: @elysiajs/eden, @sinclair/typebox, @sinclair/typebox/errors, @sinclair/typebox/value
9:42:39 AM [vite] ✨ optimized dependencies changed. reloading
[BABEL] Note: The code generator has deoptimised the styling of my-app/node_modules/.vinxi/client/deps/date-fns_locale.js?v=c4d2853d as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of my-app/node_modules/.vinxi/client/deps/date-fns_locale.js as it exceeds the max of 500KB.
9:42:42 AM [vite] Error when evaluating SSR module /src/routes/api/server.ts: failed to import "sendim-sendgrid"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/sendim-sendgrid/dist/index.js:7:4)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
9:42:42 AM [vite] Error when evaluating SSR module /src/routes/api/[...path].ts?pick=GET: failed to import "/src/routes/api/server.ts"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/sendim-sendgrid/dist/index.js:7:4)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
[h3] [unhandled] 83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
error: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/sendim-sendgrid/dist/index.js:8:1
83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
TypeError: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/sendim-sendgrid/dist/index.js:8:1
9:42:50 AM [vite] page reload src/routes/api/server.ts
9:42:50 AM [vite] page reload src/routes/api/server.ts (x2)
9:43:16 AM [vite] page reload src/routes/api/server.ts (x3)
9:43:16 AM [vite] page reload src/routes/api/server.ts (x4)
9:43:17 AM [vite] Error when evaluating SSR module /src/routes/api/server.ts:
|- Error: Can't find variable: require
at <anonymous> (:34:17)
at processTicksAndRejections (:13:78)
9:43:17 AM [vite] Error when evaluating SSR module /src/routes/api/[...path].ts?pick=GET: failed to import "/src/routes/api/server.ts"
|- Error: Can't find variable: require
at <anonymous> (:34:17)
at processTicksAndRejections (:13:78)
[h3] [unhandled] 34 | export default "";
^
error: Can't find variable: require
34 | export default "";
^
ReferenceError: Can't find variable: require
9:43:27 AM [vite] page reload src/routes/api/server.ts
9:43:27 AM [vite] page reload src/routes/api/server.ts (x2)
9:43:28 AM [vite] Error when evaluating SSR module /src/routes/api/server.ts: failed to import "@sendgrid/mail"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
9:43:28 AM [vite] Error when evaluating SSR module /src/routes/api/[...path].ts?pick=GET: failed to import "/src/routes/api/server.ts"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
[h3] [unhandled] 83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
error: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
TypeError: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
9:43:55 AM [vite] page reload src/routes/api/server.ts
9:43:55 AM [vite] page reload src/routes/api/server.ts (x2)
9:46:17 AM [vite] page reload src/routes/api/server.ts (x3)
9:46:17 AM [vite] page reload src/routes/api/server.ts (x4)
9:46:18 AM [vite] Error when evaluating SSR module /src/routes/api/server.ts: failed to import "@sendgrid/mail"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
9:46:18 AM [vite] Error when evaluating SSR module /src/routes/api/[...path].ts?pick=GET: failed to import "/src/routes/api/server.ts"
|- Error: First argument must be an Error object
at ErrorPrepareStackTrace (native)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at <anonymous> (my-app/node_modules/axios/node_modules/follow-redirects/index.js:60:25)
at anonymous (native)
at <anonymous> (my-app/node_modules/axios/dist/node/axios.cjs:11:6)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/classes/client.js:3:0)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/src/client.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/client/index.js:5:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/src/mail.js:8:21)
at anonymous (native)
at <anonymous> (my-app/node_modules/@sendgrid/mail/index.js:5:17)
at <anonymous> (:12:86)
at processTicksAndRejections (:13:78)
[h3] [unhandled] 83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
error: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
83 | break;
84 | }
85 | } else if (status !== "hiding") {
86 | newTrace.push(trace[i]);
87 | }
88 | }
^
TypeError: First argument must be an Error object
at ErrorPrepareStackTrace (native:1:1)
at stackTraceRewriter (my-app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:88:42)
at captureStackTrace (native:1:1)
at new CustomError (my-app/node_modules/axios/node_modules/follow-redirects/index.js:620:4)
at createErrorType (my-app/node_modules/axios/node_modules/follow-redirects/index.js:627:17)
at my-app/node_modules/axios/node_modules/follow-redirects/index.js:539:14
at anonymous (native:1:1)
at my-app/node_modules/axios/dist/node/axios.cjs:75:3
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/classes/client.js:23:14
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/src/client.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/client/index.js:7:8
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/classes/mail-service.js:231:17
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/src/mail.js:8:21
at anonymous (native:1:1)
at my-app/node_modules/@sendgrid/mail/index.js:7:8
Thanks for your help !
The text was updated successfully, but these errors were encountered:
Hello,
Currently I want to use @sendgrid/mail in Bun environment but it's impossible to do it. When I import the package it fires immediately an error :
Bun version: 1.1.10
I have this error :
Thanks for your help !
The text was updated successfully, but these errors were encountered: