Nuxt3: serialize is not defined
See original GitHub issueWhat’s happening
Axios does not seem to work with Nuxt3. Anytime a build is run, it will fail because of an undefined field.
Steps to reproduce
- Create a simple Nuxt3 project
npm add @nuxtjs/axios
- Add ‘@nuxtjs/axios’ to modules of
nuxt.config.js
npm run build
Output
ERROR serialize is not defined
at eval (eval at <anonymous> (node_modules\lodash.template\index.js:1550:12), <anonymous>:52:1)
at compileTemplate (/C:/Users/Hugo/Documents/Development/scriptio/node_modules/@nuxt/kit/dist/index.mjs:429:45)
at async /C:/Users/Hugo/Documents/Development/scriptio/node_modules/nuxt3/dist/index.mjs:1092:22
at async Promise.all (index 13)
at async generateApp (/C:/Users/Hugo/Documents/Development/scriptio/node_modules/nuxt3/dist/index.mjs:1091:3)
at async build (/C:/Users/Hugo/Documents/Development/scriptio/node_modules/nuxt3/dist/index.mjs:1128:3)
at async Object.invoke (/C:/Users/Hugo/Documents/Development/scriptio/node_modules/nuxi-edge/dist/chunks/build.mjs:33:5)
at async _main (/C:/Users/Hugo/Documents/Development/scriptio/node_modules/nuxi-edge/dist/chunks/index.mjs:384:7)
Here is an issue that might be related: #536.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:17
- Comments:11
Top Results From Across the Web
nuxtjs/axios What is the way to initialize version 4.4.0? (nuxt.js)
I think it might be because of a problem with asyncData () {}. Also browserBaseURL: '/ api' does not work. javascript · node.js...
Read more >Setup - Axios Module - nuxtjs/axios
Because of the way Nuxt works the $axios property on the context has to be merged into the Nuxt Context interface via declaration...
Read more >nuxt-community - Bountysource
Anytime a build is run, it will fail because of an undefined field. Steps to reproduce 1. Create a simple Nuxt3 project 2....
Read more >【nuxt3】nuxt3配置axios后出现Cannot start nuxt - CSDN博客
【nuxt3】nuxt3配置axios后出现Cannot start nuxt: serialize is not defined. 沉默小管 已于 2022-02-27 20:22:01 修改 2014 收藏 1. 分类专栏: nuxt3 文章标签: ...
Read more >Nuxt 3 first steps. - ITNEXT
npx nuxi init nuxt3-app · npm install or yarn · [vite:import-analysis] Cannot read property 'uid' of undefined · yarn add -D eslint @typescript-eslint/eslint- ......
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
I’ve got the same problem with
serialize is not defined
My solution
It’s helped to add
{ proxyHeaders: false }
to the modules fom this comment:and also
baseURL
to the axios publicRuntimeConfig from this comment:First time using Nuxt 3, same issue.
My Config:
Error: