Hi, my name is Yang and I recently had a request in my project (using the NUXT framework) to change the colors of all the Element buttons. Then I read them carefully and found an option to customize the theme in the Element document, which greatly shortened the development time. Immediately follow the document to start using, after modification, I found that there were a lot of warnings when the project was running, as follows:

At first, I found that this warning did not affect the use, so I did not want to talk to him. But he was too bad for the appearance, and the supervisor was not satisfied with it, so he asked me to hurry up and deal with it

All right, we have to deal with it. Sass has been upgraded to abolish the use of /, and when using element to customize the theme, it still uses /, so the exception is raised

Now that the problem has been found, let’s look for a solution:

Json file: sass: “~1.32.6”, so no error will be reported. Well, then it’s time to fish again, and sure enough, it doesn’t work!

After my unremitting search, I finally found an effective solution to share with you:

  1. in your package.json add

Add the following code to your package.json file

"preinstall": "npx npm-force-resolutions"
Copy the code

Inside the scripts section // Add the following code to the scripts section under package.json

  1. add
"Resolutions ": {"sass": "1.32.12"},Copy the code

Below your scripts section // Similar to segmentation

  1. after that run command npm i after finish run again your project and voila the error was gone

// Add complete only run NPM I complete pull

if you dont understand my step this my package.json

// Here is the file structure of his package.json

"scripts": { "dev": "nuxt", "build": "nuxt build", "start": "nuxt start", "generate": "nuxt generate", "preinstall": "npx npm-force-resolutions" // preinstall goes here }, "resolutions": { // resolutions goes here "sass": "1.32.12"}, "dependencies": {// some dependencies}Copy the code

After that run command NPM I or NPM install after finish run again your project // Run your project after NPM I or NPM install

Attach a link to Github: https://github.com/nuxt-community/vuetify-module/issues/446

Comment:

Feel useful can point a praise ah, thank you!