CL.exe not found when installing ionic using npm on Windows 10

Hi All,

I’m new to ionic, so I’m not even sure this is the right place to post this. However, any help will be highly appreciated.
I am trying to install ionic on windows 10, using npm. I have installed Cordova “successfully”. I only got a warning about xmlbuilder expecting an older version of node, but it seemed everything went fine, as there were no errors after that.
However when I try to install ionic, it runs almost to the end, and then fails I think when it’s trying to compile some files, which suggests that the downloads were successful. I think this is where everything starts to go wrong:

ClCompile:
CL.exe /c /I"C:\Users\Iyke.node-gyp\5.0.0\include\node" /I"C:\Users\Iyke.node-gyp\5.0.0\src" /I"C:\Users\Iyke.node
-gyp\5.0.0\deps\uv\include" /I"C:\Users\Iyke.node-gyp\5.0.0\deps\v8\include" /Zi /nologo /W3 /WX- /Ox /Ob2 /Oi /Ot /
Oy /GL /D NODE_GYP_MODULE_NAME=libsass /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCE
PTIONS=0 /D BUILDING_V8_SHARED=1 /D BUILDING_UV_SHARED=1 /D “LIBSASS_VERSION=“3.2.5"” /GF /Gm- /MT /GS /Gy /fp:prec
ise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\libsass\” /Fd"Release\obj\libsass\libsass.pdb" /Gd /TP
/wd4351 /wd4355 /wd4800 /wd4251 /errorReport:queue /GR /EHs /MP …\src\libsass\ast.cpp …\src\libsass\base64vlq
.cpp …\src\libsass\bind.cpp …\src\libsass\constants.cpp …\src\libsass\context.cpp …\src\libsass\conte
xtualize.cpp …\src\libsass\contextualize_eval.cpp …\src\libsass\cssize.cpp …\src\libsass\emitter.cpp …
.\src\libsass\error_handling.cpp …\src\libsass\eval.cpp …\src\libsass\expand.cpp …\src\libsass\extend.cpp
…\src\libsass\file.cpp …\src\libsass\functions.cpp …\src\libsass\inspect.cpp …\src\libsass\json.cpp
…\src\libsass\lexer.cpp …\src\libsass\listize.cpp …\src\libsass\node.cpp …\src\libsass\output.cpp …
…\src\libsass\parser.cpp …\src\libsass\plugins.cpp …\src\libsass\position.cpp …\src\libsass\prelexer.cpp
…\src\libsass\remove_placeholders.cpp …\src\libsass\sass.cpp …\src\libsass\sass2scss.cpp …\src\libsa
ss\sass_context.cpp …\src\libsass\sass_functions.cpp …\src\libsass\sass_util.cpp …\src\libsass\sass_value
s.cpp …\src\libsass\source_map.cpp …\src\libsass\to_c.cpp …\src\libsass\to_string.cpp …\src\libsass\u
nits.cpp …\src\libsass\utf8_string.cpp …\src\libsass\util.cpp
TRACKER : error TRK0005: Failed to locate: “CL.exe”. The system cannot find the file specified. [C:\Users\Iyke\AppData
Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\src\libsass.vcxproj]

Done Building Project “C:\Users\Iyke\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\nod
e-sass\build\src\libsass.vcxproj” (default targets) – FAILED.

Done Building Project “C:\Users\Iyke\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\nod
e-sass\build\binding.vcxproj.metaproj” (default targets) – FAILED.

Done Building Project “C:\Users\Iyke\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\nod
e-sass\build\binding.sln” (default targets) – FAILED.

Build FAILED.

“C:\Users\Iyke\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\binding.s
ln” (default target) (1) ->
“C:\Users\Iyke\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\binding.v
cxproj.metaproj” (default target) (2) ->
“C:\Users\Iyke\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\src\libsa
ss.vcxproj” (default target) (3) ->
(ClCompile target) ->
TRACKER : error TRK0005: Failed to locate: “CL.exe”. The system cannot find the file specified. [C:\Users\Iyke\AppDat
a\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\build\src\libsass.vcxproj]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:04.07
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Iyke\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command “C:\Program Files\nodejs\node.exe” “…\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” "–libsass_library="
gyp ERR! cwd …\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
Build failed
npm WARN install:node-sass@3.3.3 node-sass@3.3.3 postinstall: node scripts/build.js
npm WARN install:node-sass@3.3.3 Exit status 1

Then it exits with an error code.

I have searched for the CL.exe file and it’s here “Microsoft Visual Studio 11.0\VC\bin” and here “Microsoft Visual Studio 12.0\VC\bin”

I don’t know what else to do. Please help…

On Windows, I would recommend not using most recent node, you’re using node 5.x, try using 0.12.x and consider installing it using a node env manager like nodist.

Thanks, I downgraded to 4.x and it worked.