How to get yarn install --offline with node-sass working?

坚强是说给别人听的谎言 提交于 2019-12-04 07:47:45
null_pointer

As @jonrsharpe pointed out, you need to use either --sass-binary-site, --sass-binary-name or --sass-binary-path to to tell node-sass where to find libsass. In my case I ended up using sass-binary-path.

So the first thing I did was download the Windows version of libsass here. I downloaded the _binding.node version because I assumed the _binding.pdb version is a debugging file.

I my case I created a .yarnrc that looks like the below:

yarn-offline-mirror "////sharedrive//folder"
yarn-offline-mirror-pruning true
sass-binary-path "////sharedrive//folder//win32-ia32-47_binding.node"

With the Windows version all / needed to be escaped with //. sass-binary-path needed the libsass binary at the end which in the above case is win32-ia32-47_binding.node.

So with all that everything worked great.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!