简体   繁体   English

如何使用NPM安装Susy 2与Gulp一起使用

[英]How to install Susy 2 using npm for use with gulp

According to the Susy 2.1.2 documentation , installing Susy is as simple as running npm install susy --save-dev then altering your Gulpfile in accordance with the afore-mentioned doc. 根据Susy 2.1.2文档 ,安装Susy就像运行npm install susy --save-dev然后按照上述文档更改Gulpfile一样简单。 You might suspect this would install 2.1.2. 您可能会怀疑这会安装2.1.2。

However, this operation installs Susy 3. Susy 3 introduced breaking changes compared to Susy 2, which is preventing my client's SASS code from compiling. 但是,此操作安装了Susy3。与Susy 2相比,Susy 3引入了重大更改,这阻止了我客户端的SASS代码编译。 There is no documentation for how to install Susy 2 in the Susy 3 docs. Susy 3文档中没有有关如何安装Susy 2的文档。

How can I install Susy 2 using npm for use with Gulp? 如何使用npm安装Susy 2以与Gulp一起使用?

to force susy to stay in 2.x you can run 迫使怀疑者停留在2.x中,您可以运行

npm install --save susy@2.x

this will install the latest version of 2.x but not 3.x+ 这将安装最新版本的2.x,但不会安装3.x +

The answer was quite obvious in hindsight. 事后看来答案很明显。 In package.json, change "susy": "^3.1.6" to "Susy": "2.2.14" . 在package.json中,将"susy": "^3.1.6"更改为"Susy": "2.2.14" Remove the susy directory in node_modules, then run npm install again. 删除node_modules中的susy目录,然后再次运行npm install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM