A brief discussion on the corresponding versions of node node-sass sass-loader

A brief discussion on the corresponding versions of node node-sass sass-loader

Check whether the node-sass and node versions correspond

node -v

The specific corresponding versions are as follows:

insert image description here

Image from https://github.com/sass/node-sass

The node version does not correspond, upgrade or downgrade the node

Use nvm to manage and switch node versions

Install nvm-window https://github.com/coreybutler/nvm-windows. Win10 adds system environment and user environment by default. If the command line cannot use nvm, you need to add the environment yourself

Use the image to find the settings.txt file in the nvm installation directory

node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/

Install and use node.js through nvm
Use the install command in nvm to install different versions of node.js. For example, to install version 12.1.0 of node.js:

nvm install 12.1.0

To switch to a certain version, you can use the use command, such as:

nvm use 12.1.0

After the switch is complete, you can enter node -v and npm -v, and you can see that the version has been switched to the version you want to use.
5. Check the installed node version and the version in use

nvm ls 

insert image description here

node-sass version mismatch

Execute in project environment

npm uninstall node-sass
npm install node-sass@version number --save-dev 

Check if the node-sass and sass-loader versions correspond

The following are some version numbers corresponding to the specific Baidu

sass-loader 4.1.1, node-sass 4.3.0
sass-loader 7.0.3, node-sass 4.7.2
sass-loader 7.3.1, node-sass 4.7.2
sass-loader 7.3.1, node-sass 4.14.1

Execute in project environment

npm uninstall node-sass sass-loader
npm install sass-loader@version numbernode-sass@version number--save-dev //Install the corresponding version

This is the end of this article about the node node-sass sass-loader version correspondence issue. For more relevant node node-sass sass-loader version correspondence content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Using sass in vue and solving compilation errors caused by too high a version of sass-loader
  • Solve the error problem after vue cli4 upgrades sass-loader (v8)
  • How to solve the version conflict between sass-loader and node-sass

<<:  Ubuntu 20.04 turns on hidden recording noise reduction function (recommended)

>>:  How to query date and time in mysql

Recommend

Basic usage and pitfalls of JavaScript array sort() method

Preface In daily code development, there are many...

How to deploy services in Windows Server 2016 (Graphic Tutorial)

introduction Sometimes, if there are a large numb...

Analysis of the causes of accidents caused by Unicode signature BOM

Maybe you are using include files here, which is u...

Example statements for indexes and constraints in MySQL

Foreign Keys Query which tables the primary key o...

Solution to span width not being determined in Firefox or IE

Copy code The code is as follows: <html xmlns=...

How to define input type=file style

Why beautify the file control? Just imagine that a...

Example of how to configure cross-domain failure repair in nginx

Nginx cross-domain configuration does not take ef...

Implementation of automatic completion of Docker commands

Preface I don't know how long this friend has...

Bootstrap 3.0 learning notes button style

This article mainly explains the style of buttons...

Implementation of installing Docker in win10 environment

1. Enter the Docker official website First, go to...

W3C Tutorial (11): W3C DOM Activities

The Document Object Model (DOM) is a platform, a ...

MySQL 5.7.23 decompression version installation tutorial with pictures and text

It is too troublesome to find the installation tu...