{"id":128,"hash":"3eb292fcee47f5dbdf2d846b18a473003bfd8e12743ce021ec03b566e8173ecd","pattern":"npm install with error: `gyp` failed with exit code: 1","full_message":"I'm try to install modules on Windows 10 using npm 5.6.0. When I enter npm install I get:\n\ngyp ERR! configure error\ngyp ERR! stack Error: `gyp` failed with exit code: 1\ngyp ERR! stack at ChildProcess.onCpExit (C:\\Users\\xiaooming\\Desktop\\app\\node_modules\\node-gyp\\lib\\configure.js:336:16)\ngyp ERR! stack at emitTwo (events.js:126:13)\ngyp ERR! stack at ChildProcess.emit (events.js:214:7)\ngyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)\ngyp ERR! System Windows_NT 10.0.16299\ngyp ERR! command \"D:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Users\\\\xiaooming\\\\Desktop\\\\app\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"rebuild\" \"--verbose\" \"--libsass_ext=\" \"--libsass_cflags=\" \"--libsass_ldflags=\" \"--libsass_library=\"\ngyp ERR! cwd C:\\Users\\xiaooming\\Desktop\\app\\node_modules\\node-sass\ngyp ERR! node -v v8.10.0\ngyp ERR! node-gyp -v v3.6.2\ngyp ERR! not ok\nBuild failed with error code: 1\nnpm WARN kingt4.0app@1.0.0 No repository field.\nnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\\fsevents):\nnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {\"os\":\"darwin\",\"arch\":\"any\"} (current: {\"os\":\"win32\",\"arch\":\"x64\"})\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`\nnpm ERR! Exit status 1\nnpm ERR!\nnpm ERR! Failed at the node-sass@3.13.1 postinstall script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! C:\\Users\\xiaooming\\AppData\\Roaming\\npm-cache\\_logs\\2018-03-18T13_02_03_946Z-debug.log\n\nIt seems like node-sass install error. The environment is below:\n\nPython version: 2.7.14\n\nnpm version: 5.6.0\n\nnode version: 8.10.0\n\nruby version: 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]\n\nsystem: win10(x64)\n\nnode-gyp: 3.6.2\n\nAnd I have installed Microsoft Visual Studio express 2015,\nthe below command has been executed：\n\nnpm config set msvs_version 2015\nnode-gyp configure --msvs_version=2015\nnpm install --global --production windows-build-tools\n\npackage.json\n{\n  \"name\": \"kingt4.0app\",\n  \"version\": \"1.0.0\",\n  \"description\": \"an kingt4.0 project.\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"test.js\"\n  },\n  \"keywords\": [\n    \"finance\"\n  ],\n  \"author\": \"kingdom\",\n  \"license\": \"ISC\",\n  \"devDependencies\": {\n    \"browser-sync\": \"^2.11.1\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-autoprefixer\": \"^3.1.0\",\n    \"gulp-cache\": \"^0.4.2\",\n    \"gulp-changed\": \"^1.3.2\",\n    \"gulp-clean-css\": \"^2.0.2\",\n    \"gulp-file-include\": \"^0.13.7\",\n    \"gulp-if\": \"^2.0.0\",\n    \"gulp-imagemin\": \"^2.4.0\",\n    \"gulp-rename\": \"^1.2.2\",\n    \"gulp-sass\": \"^2.2.0\",\n    \"gulp-sourcemaps\": \"^1.6.0\",\n    \"gulp.spritesmith\": \"^6.2.1\",\n    \"imagemin-jpegtran\": \"^4.3.2\",\n    \"imagemin-pngquant\": \"^4.2.2\",\n    \"merge-stream\": \"^1.0.0\",\n    \"normalize.css\": \"^4.0.0\",\n    \"spritesheet-templates\": \"^10.1.2\",\n    \"vinyl-buffer\": \"^1.0.0\"\n  },\n  \"dependencies\": {\n    \"remodal\": \"^1.0.7\",\n    \"slick-carousel\": \"^1.6.0\"\n  }\n}\n\nHow to resolve this problem? thanks for help.","ecosystem":"npm","package_name":"windows","package_version":null,"solution":"If this is a mac machine (OSX) here is what you can do\n\nuse terminal\n\nxcode-select --print-path\n\nthen remove installed version \n\nsudo rm -r -f /Library/Developer/CommandLineTools\n\nand reinstall\n\nxcode-select --install\n\nthat should fix the problem \n\nRef: gyp: No Xcode or CLT version detected macOS Catalina","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/49348482/npm-install-with-error-gyp-failed-with-exit-code-1","votes":80,"created_at":"2026-04-19T04:41:21.905185+00:00","updated_at":"2026-04-19T04:51:03.654470+00:00"}