Set both 32 and 64 bit bindings

I am using gulp with Visual Studio to create sass files on Windows. This uses libsass, which has both 64 and 32 bit bindings.

Visual Studio runs in a 32-bit context and thus installs and requires the 32-bit libsass library. However, running msbuild from the command line requires a 64-bit version of libsass.

This means that I constantly get an error message libsass bindings not found in ...\node-sass\vendor\win32-ia32-11\binding.node. Try reinstalling node-sass(or win32-x64-14after redirecting from the command line).

Running npm installfrom different contexts does not work, because npm believes that the module is already fully installed.

Currently, the only solution I have found is to permanently delete the entire node_modules folder and reinstall all the packages every time.

Ideally, I would like to install 32 and 64-bit packages at the same time.

+4
source share
2 answers

Instead of mixing versions 64 and 32, you can configure Visual Studio to have a permanent local installation of node.

In Visual Studio: Go to Tools> Options> Projects and Solutions> External Web Tools and move $(PATH)up $(DevEnvDir)\Extensions\Microsoft\Web Tools\External. Now VS will invoke the local installation of node.

+5
source

A workaround that may be useful is to copy the required binding.node file to the folder with the corresponding name. The binding.node files can be downloaded from the node-sass release page .

binding.node , binding.node( , ), , .

+1

Source: https://habr.com/ru/post/1607608/


All Articles