gulp integration in Visual Studio 2017 not working
Point your VS tools to the node installation on your path.
I can see in the error that there a version discrepancy between 5.x
and 8.x
- with VS likely being the older one (since it ships with pre-packaged and outdated node) and is taking execution precedence with the default setup.
I'm guessing you installed node-sass
via your 8.x
(external command line) instance but VS is trying to execute your gulp tasks via your VS's internal 5.x
. node-sass
leverages node-gyp to build a binary via installation scripts, and there will be incompatibilities across versions. In other words, this package, and many others that build binaries, are specifically tailored to the version of node it was installed against. To summarize, everything in node_modules/.bin
is built against 8.x
but is actually running on 5.x
when you do so through Visual Studio.
Fear not, this is easily solved. Check out this answer for some historical context on this long running issue that many face. Basically, you want $(PATH)
to be at the top of this list so your OS installation is always used...
Once you do this (just to be safe) - blow away node_modules
, reinstall, and happy coding. VS really needs to stop shipping with pinned versions of node...