Getting errors adding Buefy to Nuxt

Viewed 142

I have a Nuxt project. I've installed Buefy via the steps outlined in the docs. That is:

  1. Run npm i nuxt-buefy
  2. Add 'nuxt-buefy' to modules in nuxt.config.js

I then run the dev server via

npm run dev

...and I get this gumf below. Thing is, Buefy doesn't say anything about having to first add postcss-custom-properties. What am I doing wrong?

 ERROR  Cannot find module 'postcss-custom-properties'                                                                                                                                     18:54:24  
Require stack:
- C:\Users\mitya\Sync\dev\projects\rpar\node_modules\@nuxt\core\dist\core.js

  Require stack:
  - node_modules\@nuxt\core\dist\core.js
  at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
  at Function.resolve (internal/modules/cjs/helpers.js:94:19)
  at m (node_modules\jiti\dist\jiti.js:1:52953)
  at Resolver.f [as _require] (node_modules\jiti\dist\jiti.js:1:53766)
  at Resolver.requireModule (node_modules\@nuxt\core\dist\core.js:381:29)
  at node_modules\@nuxt\webpack\dist\webpack.js:603:58
  at Array.map (<anonymous>)
  at PostcssConfig$1.loadPlugins (node_modules\@nuxt\webpack\dist\webpack.js:602:10)
  at PostcssConfig$1.config (node_modules\@nuxt\webpack\dist\webpack.js:638:14)
  at StyleLoader.postcss (node_modules\@nuxt\webpack\dist\webpack.js:909:39)
  at StyleLoader.apply (node_modules\@nuxt\webpack\dist\webpack.js:969:12)
  at WebpackClientConfig.rules (node_modules\@nuxt\webpack\dist\webpack.js:1357:28)
1 Answers

At the end, scaffolding a brand new Nuxt project was still the easiest to setup Buefy.

Probably that comparing both a new project and an old one and transferring the configuration is the way to go.

Related