npm run dev error solutions

 

Personal problems for reference only:

Use npm run dev running, the following error occurs:

Failed to compile.

 

./src/styles/index.scss (./node_modules/css-loader??ref--11-1!./node_modules/postcss-loader/lib??ref--11-2!./node_modules/sass-loader/lib/loader.js??ref--11-3!./src/styles/index.scss)

Module build failed (from ./node_modules/sass-loader/lib/loader.js):

Error: Missing binding E:\test\node_modules\node-sass\vendor\win32-x64-67\binding.node

Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 11.x

 

Found bindings for the following environments:

  - Windows 64-bit with Node.js 10.x

 

This usually happens because your environment has changed since running `npm install`.

Run `npm rebuild node-sass` to download the binding for your current environment.

 

First, in order to install the following files in the project directory:

npm install node-sass 

npm i node-sass -D

If the error continues, it will remind installation element-ui can run the project, and we continue to install it in the project directory like:

npm install --save element-ui

Then run the project to OK it, and finally it is not being given!

 

Personal problems for reference only:

Use npm run dev running, the following error occurs:

Failed to compile.

 

./src/styles/index.scss (./node_modules/css-loader??ref--11-1!./node_modules/postcss-loader/lib??ref--11-2!./node_modules/sass-loader/lib/loader.js??ref--11-3!./src/styles/index.scss)

Module build failed (from ./node_modules/sass-loader/lib/loader.js):

Error: Missing binding E:\test\node_modules\node-sass\vendor\win32-x64-67\binding.node

Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 11.x

 

Found bindings for the following environments:

  - Windows 64-bit with Node.js 10.x

 

This usually happens because your environment has changed since running `npm install`.

Run `npm rebuild node-sass` to download the binding for your current environment.

 

First, in order to install the following files in the project directory:

npm install node-sass 

npm i node-sass -D

If the error continues, it will remind installation element-ui can run the project, and we continue to install it in the project directory like:

npm install --save element-ui

Then run the project to OK it, and finally it is not being given!

Guess you like

Origin www.cnblogs.com/furenjian/p/12604073.html