前言
小编最近在开发项目中由于在团队开发中经常遇到由于node版本,sass版本,ajv-keywords@3.1.0版本不同等一系列原因而造成的错误导致项目启动失败。
1,由于node版本号不同导致的sass的报错以及sass的报错,如下错误;
Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)
For more information on which environments are supported please see:
解决办法: 使用save会在package.json中自动添加,依次进行安装
npm install node-sass --save-dev
npm install sass-loader --save-dev
2,ajv报错,如下:是由于版本不同引起的。
npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
解决办法:npm install ajv@^6.0.0
后边的是版本号(看你需要什么版本)