Error deploying Nuxt.js application
See original GitHub issueHello,
I’m trying to deploy a new Nuxt.js (v2.15.0) SSR application into Vercel, however I’m getting a lot of errors.
I tried a few things that I saw in #369 , #425 which is basically set a fixed version at "@nuxtjs/vercel-builder"
, however none of then worked, I get the same errors everytime.
Function logs
[GET] /
17:33:20:30
2021-02-20T20:33:20.581Z undefined ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'esm'\nRequire stack:\n- /var/task/vercel__launcher.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js","stack":["Runtime.ImportModuleError: Error: Cannot find module 'esm'","Require stack:","- /var/task/vercel__launcher.js","- /var/runtime/UserFunction.js","- /var/runtime/index.js"," at _loadUserApp (/var/runtime/UserFunction.js:100:13)"," at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)"," at Object.<anonymous> (/var/runtime/index.js:43:30)"," at Module._compile (internal/modules/cjs/loader.js:1063:30)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)"," at Module.load (internal/modules/cjs/loader.js:928:32)"," at Function.Module._load (internal/modules/cjs/loader.js:769:14)"," at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)"," at internal/main/run_main_module.js:17:47"]}
Unknown application error occurred
Runtime.ImportModuleError
[HEAD] /
17:33:09:09
2021-02-20T20:33:09.353Z undefined ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'esm'\nRequire stack:\n- /var/task/vercel__launcher.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js","stack":["Runtime.ImportModuleError: Error: Cannot find module 'esm'","Require stack:","- /var/task/vercel__launcher.js","- /var/runtime/UserFunction.js","- /var/runtime/index.js"," at _loadUserApp (/var/runtime/UserFunction.js:100:13)"," at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)"," at Object.<anonymous> (/var/runtime/index.js:43:30)"," at Module._compile (internal/modules/cjs/loader.js:1063:30)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)"," at Module.load (internal/modules/cjs/loader.js:928:32)"," at Function.Module._load (internal/modules/cjs/loader.js:769:14)"," at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)"," at internal/main/run_main_module.js:17:47"]}
Unknown application error occurred
Runtime.ImportModuleError
[GET] /favicon.ico
17:33:21:04
2021-02-20T20:33:21.330Z undefined ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'esm'\nRequire stack:\n- /var/task/vercel__launcher.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js","stack":["Runtime.ImportModuleError: Error: Cannot find module 'esm'","Require stack:","- /var/task/vercel__launcher.js","- /var/runtime/UserFunction.js","- /var/runtime/index.js"," at _loadUserApp (/var/runtime/UserFunction.js:100:13)"," at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)"," at Object.<anonymous> (/var/runtime/index.js:43:30)"," at Module._compile (internal/modules/cjs/loader.js:1063:30)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)"," at Module.load (internal/modules/cjs/loader.js:928:32)"," at Function.Module._load (internal/modules/cjs/loader.js:769:14)"," at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)"," at internal/main/run_main_module.js:17:47"]}
Unknown application error occurred
Runtime.ImportModuleError
vercel.json
{
"version": 2,
"builds": [
{
"src": "nuxt.config.js",
"use": "@nuxtjs/vercel-builder",
"config": {
"serverFiles": ["package.json"]
}
}
],
"routes": [
{
"src": "/_nuxt/.+",
"headers": {
"Cache-Control": "public, max-age=31557600"
}
},
{
"src": "/sw.js",
"dest": "/_nuxt/static/sw.js",
"headers": {
"Cache-Control": "public, max-age=43200, immutable",
"Service-Worker-Allowed": "/"
}
},
{
"src": "^/(.*)",
"dest": "/"
}
]
}
Any help would be much appreciated. Thank you.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:26 (9 by maintainers)
Top Results From Across the Web
Nuxt app failed heroku deployement code=H10 error
I'm trying to deploy my ecommerce nuxt app to heroku. Here's exactly what I did heroku create myapplok heroku buildpacks:set heroku/nodejs ...
Read more >Commands and Deployment - Nuxt
Use it for Node.js hosting like Heroku, Digital Ocean, etc. ... To deploy a SSR application we use target: 'server' , where server...
Read more >An ultimate guide to CICD for your Nuxt.js Application
This tutorial will demonstrate how to build, test, and deploy your Nuxt.js Application to GitHub Pages using CircleCI.
Read more >Deployment · Get Started with Nuxt
Deployment. A Nuxt application can be deployed on a Node.js server, pre-rendered for static hosting, or deployed to serverless or edge (CDN) environments....
Read more >Deploy Nuxt 3 sites with universal rendering on Azure Static ...
When you build a Nuxt.js site using npm run build , the app is built as a traditional web app, not a static...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@guastallaigor Possibly you didn’t add the additional file to
serverFiles
in your config?#589