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
My project is a SSR application deployed to AWS Lambda. I'm adding a blog section to this app and used Nuxt Content in the document-driven mode. After adding the nuxt content to this project, when I deploy the application, I'm getting an internal server error and below is the error stack in the AWS Cloudwatch,
2024-03-10T04:04:37.099Z undefined ERROR Uncaught Exception { "errorType": "ReferenceError", "errorMessage": "_import_meta_url_ is not defined", "stack": [ "ReferenceError: _import_meta_url_ is not defined", " at file:///var/task/index.mjs:1:65", " at ModuleJob.run (node:internal/modules/esm/module_job:218:25)", " at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)", " at async _tryAwaitImport (file:///var/runtime/index.mjs:1008:16)", " at async _tryRequire (file:///var/runtime/index.mjs:1057:86)", " at async _loadUserApp (file:///var/runtime/index.mjs:1081:16)", " at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1119:21)", " at async start (file:///var/runtime/index.mjs:1282:23)", " at async file:///var/runtime/index.mjs:1288:1" ] }
When I remove the nuxt content from the project, it works as expected. Also when I tried the nitro preset to the default node server, it worked fine.
Environment
Darwin
v20.11.0
3.10.3
3.10.1
2.9.2
npm@10.2.4
-
devtools
,modules
,content
,nitro
@nuxt/content@2.12.1
-
Reproduction
https://stackblitz.com/edit/github-agpzne-qkcpqs?file=pages%2F%5B...slug%5D.vue
Describe the bug
My project is a SSR application deployed to AWS Lambda. I'm adding a blog section to this app and used Nuxt Content in the document-driven mode. After adding the nuxt content to this project, when I deploy the application, I'm getting an internal server error and below is the error stack in the AWS Cloudwatch,
2024-03-10T04:04:37.099Z undefined ERROR Uncaught Exception { "errorType": "ReferenceError", "errorMessage": "_import_meta_url_ is not defined", "stack": [ "ReferenceError: _import_meta_url_ is not defined", " at file:///var/task/index.mjs:1:65", " at ModuleJob.run (node:internal/modules/esm/module_job:218:25)", " at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)", " at async _tryAwaitImport (file:///var/runtime/index.mjs:1008:16)", " at async _tryRequire (file:///var/runtime/index.mjs:1057:86)", " at async _loadUserApp (file:///var/runtime/index.mjs:1081:16)", " at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1119:21)", " at async start (file:///var/runtime/index.mjs:1282:23)", " at async file:///var/runtime/index.mjs:1288:1" ] }
When I remove the nuxt content from the project, it works as expected. Also when I tried the nitro preset to the default node server, it worked fine.
Additional context
Nuxt.config.ts,
Nuxt build command for Deployment,
NUXT_PUBLIC_API_BASE=https://my-api.com NUXT_APP_CDN_URL=my-static-bucket-url npx nuxt build
Logs
No response
The text was updated successfully, but these errors were encountered: