nuxt
nuxt copied to clipboard
After upgrading Nuxt 3.0.0 to 3.2.0 problem
Environment
- Operating System:
Darwin
- Node Version:
v16.16.0
- Nuxt Version:
3.2.0
- Nitro Version:
2.2.1
- Package Manager:
[email protected]
- Builder:
vite
- User Config:
app
,typescript
,runtimeConfig
,modules
,colorMode
,tailwindcss
- Runtime Modules:
@nuxtjs/[email protected]
,[email protected]
,@nuxtjs/[email protected]
,@pinia/[email protected]
- Build Modules:
-
Reproduction
-
yarn upgrade nuxt --latest
-
yarn dev
ERROR Cannot start nuxt: Cannot find module 'postcss-custom-properties'
- Open
nuxt.config.ts
will see this on thecolorMode
property.
Argument of type '{ app: { head: { link: { rel: "icon"; type: "image/svg+xml"; href: string; }[]; }; }; typescript: { shim: false; strict: true; }; runtimeConfig: { apiSecret: string; public: { apiBase: string; }; }; modules: (string | [...])[]; colorMode: { ...; }; tailwindcss: { ...; }; }' is not assignable to parameter of type 'NuxtConfig'.
Object literal may only specify known properties, and 'colorMode' does not exist in type 'NuxtConfig'.
Describe the bug
After upgrading nuxt 3.0.0
to 3.2.0
, will see the problems.
-
colorMode
module option in nuxt3.0.0
shows the type as
(property) NuxtConfig['colorMode']?: Partial<ModuleOptions> | undefined
but shows error in nuxt 3.2.0
.
- We need to install
postcss-custom-properties
in nuxt3.2.0
, didn't need it in nuxt3.0.0
.
Additional context
No response
Logs
No response
@regchiu Try upgrading @nuxtjs/tailwindcss to the latest and clear your caches.
Otherwise please create a reproduction repo
The repo is here.
rep: https://github.com/regchiu/nuxt3-starter-template
Just run yarn upgrade nuxt --latest
then run yarn dev
, you can see:
-
colorMode
type error innuxt.config.ts
file. This doesn't affect program work, but typescript type error can be a bit annoying.
- postcss-custom-properties error. This does not need to be installed in nuxt 3.0.0 version.
So I need to upgrade all of nuxt module packages? thank you for your help.
Yes try upgrading and then see what issues are left
If this is not a nuxt 3.2.0 bug, I would like to close this issue. Thank you.
did upgrading fix all the issues?
did upgrading fix all the issues?
@JokerMartini Try nuxi upgrade --force
.