sails command not working in windows8 instead it opens notepad with some script - sails.js

Here are my prompt command logs from when it was installed on my system:
C:\Users\shiva.namburu>npm install sails -g
\
sails#0.11.2 preinstall C:\Users\shiva.namburu\AppData\Roaming\npm\node_module
s\sails
node ./lib/preinstall_npmcheck.js
Sails.js Installation: Checking npm-version successful
npm WARN deprecated grunt-lib-contrib#0.7.1: DEPRECATED. See readme: https://git
hub.com/gruntjs/grunt-lib-contrib
bufferutil#1.2.1 install C:\Users\shiva.namburu\AppData\Roaming\npm\node_modul
es\sails\node_modules\sails-hook-sockets\node_modules\socket.io\node_modules\eng
ine.io\node_modules\ws\node_modules\bufferutil
node-gyp rebuild
-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node
modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\n
odejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gy
p.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sail
s-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_modules\ws\no
de_modules\bufferutil\build\bufferutil.vcxproj(20,3): error MSB4019: The import
ed project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the pat
h in the declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node
modules\sails-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_mo
dules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
utf-8-validate#1.2.1 install C:\Users\shiva.namburu\AppData\Roaming\npm\node_m
odules\sails\node_modules\sails-hook-sockets\node_modules\socket.io\node_modules
\engine.io\node_modules\ws\node_modules\utf-8-validate
node-gyp rebuild
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sails
-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node
modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Fil
es\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\nod
e-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sail
s-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_modules\ws\no
de_modules\utf-8-validate\build\validation.vcxproj(20,3): error MSB4019: The im
ported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the
path in the declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node
modules\sails-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_mo
dules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil#1.2.1
utf-8-validate#1.2.1 install C:\Users\shiva.namburu\AppData\Roaming\npm\node_m
odules\sails\node_modules\sails-hook-sockets\node_modules\socket.io-client\node_
modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
node-gyp rebuild
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sails
-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "
C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\no
de-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sail
s-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-client\node
modules\ws\node_modules\utf-8-validate\build\validation.vcxproj(20,3): error M
SB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Co
nfirm that the path in the declaration is correct, and that the file e
xists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node
modules\sails-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-
client\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
bufferutil#1.2.1 install C:\Users\shiva.namburu\AppData\Roaming\npm\node_modul
es\sails\node_modules\sails-hook-sockets\node_modules\socket.io-client\node_modu
les\engine.io-client\node_modules\ws\node_modules\bufferutil
node-gyp rebuild
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sails
-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\P
rogram Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-g
yp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sail
s-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-client\node
modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj(20,3): error MSB40
19: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confir
m that the path in the declaration is correct, and that the file exist
s on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node
modules\sails-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-
client\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
npm WARN optional dep failed, continuing bufferutil#1.2.1
Even if I clear the cache with the npm clear cache command, the problem remains the same.
How I can install sails globally?

You have issue with compiling native modules.
Install build tools and run install again.
You can read more about this here - https://github.com/nodejs/node-gyp#installation

Related

Npm install produces error Could not find any Visual Studio installation to use, code --version produces vs code version, added it to path

Trying to run ionic, capacitor, react project after long time again on windows machine, before everything worked good, now first it asked me for python, so i installed it and added it to path, then it asks me for VS Code, I'm working in VS Code, added it as well to path, but still getting error "Could not find any Visual Studio installation to use", even though i run npm install comand from VS Code and also entering code --version gets me vs code version
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\osmd-player-react-master> code --version
1.70.1
6d9b74a70ca9c7733b29f0456fd8195364076dda
x64
This is complete error messsage
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\piano> npm install
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated #fortawesome/fontawesome#1.1.8: This package is deprecated. See https://git.io/fNCzJ for information about upgrading.
npm WARN deprecated formidable#1.2.6: Please upgrade to latest, formidable#v2 or formidable#v3! Check these notes: LINK REMOVED
npm WARN deprecated xmldom#0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated superagent#4.1.0: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm WARN deprecated ionic#5.4.16: The Ionic CLI now uses ✨ #ionic/cli ✨ for its package name! 👉 https://twitter.com/ionicframework/status/1223268498362851330
npm WARN deprecated #fortawesome/fontawesome-free-brands#5.0.13: This package is deprecated. See https://git.io/fNCzJ for information about upgrading.
npm WARN deprecated #fortawesome/fontawesome-free-solid#5.0.13: This package is deprecated. See https://git.io/fNCzJ for information about upgrading.
npm ERR! code 1
npm ERR! path C:\Dev\pianoNew\PianoTrainerNewPlayer\piano\node_modules\cap
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at "C:\Python106\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Dev\pianoNew\PianoTrainerNewPlayer\piano\node_modules\cap
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\eloi0\AppData\Local\npm-cache\_logs\2022-08-15T03_33_16_265Z-debug-0.log
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\piano> code .
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\piano> code --version
1.70.1
6d9b74a70ca9c7733b29f0456fd8195364076dda
x64
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\piano>

Problem with starting a new project with Ionic 3

I am getting an error when I try to start a new project with Ionic.
I updated node and node-sass but it still doesn't work..
NPM version: 5.6.0
Node version: v8.11.4
OS: Windows 10
This is my full log file [https://gist.github.com/yordanzhelevdev/63045a43e7c56d2eb0dca6be3b4745dc][1]
How to fix that error?
$ ionic start IonicPlaygroud tutorial
√ Preparing directory .\IonicPlaygroud - done!
√ Downloading and extracting tutorial starter - done!
? Integrate your new app with Cordova to target native iOS and Android? Yes
> ionic integrations enable cordova --quiet
[INFO] Downloading integration cordova
[INFO] Copying integrations files to project
[OK] Integration cordova added!
> npm i
npm WARN deprecated hoek#2.16.3: The major version is no longer supported. Please update to 4.x or newer
> node-sass#4.9.0 install C:\Users\User\Desktop\IonicPlaygroud\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.0/win32-x64-57_binding.node":
ESOCKETTIMEDOUT
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> uglifyjs-webpack-plugin#0.4.6 postinstall C:\Users\User\Desktop\IonicPlaygroud\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
> node-sass#4.9.0 postinstall C:\Users\User\Desktop\IonicPlaygroud\node_modules\node-sass
> node scripts/build.js
Building: C:\Program Files\nodejs\node.exe C:\Users\User\Desktop\IonicPlaygroud\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'C:\\Users\\User\\Desktop\\IonicPlaygroud\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp#3.8.0
gyp info using node#8.11.4 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\Users\User\Desktop\IonicPlaygroud\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\User\Desktop\IonicPlaygroud\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\User\Desktop\IonicPlaygroud\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\User\Desktop\IonicPlaygroud\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\User\Desktop\IonicPlaygroud\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\User\Desktop\IonicPlaygroud\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\Users\User\Desktop\IonicPlaygroud\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\User\Desktop\IonicPlaygroud\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\User\Desktop\IonicPlaygroud\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\User\Desktop\IonicPlaygroud\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\User\Desktop\IonicPlaygroud\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\User\Desktop\IonicPlaygroud\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed stack: 'Error: not found: python2\n at getNotFoundError (C:\\Users\\User\\Desktop\\IonicPlaygroud\\node_modules\\which\\which.js:13:12)\n at F (C:\\Users\\User\\Desktop\\IonicPlaygroud\\node_modules\\which\\which.js:68:19)\n at E (C:\\Users\\User\\Desktop\\IonicPlaygroud\\node_modules\\which\\which.js:80:29)\n at C:\\Users\\User\\Desktop\\IonicPlaygroud\\node_modules\\which\\which.js:89:16\n
at C:\\Users\\User\\Desktop\\IonicPlaygroud\\node_modules\\isexe\\index.js:42:5\n at C:\\Users\\User\\Desktop\\IonicPlaygroud\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Users\User\AppData\Local\Programs\Python\Python37\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\User\AppData\Local\Programs\Python\Python37\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\User\\Desktop\\IonicPlaygroud\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\User\Desktop\IonicPlaygroud\node_modules\node-sass
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.9.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2018-09-06T14_55_14_059Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Please try this link for some tips on node-sass and node-gyp on Windows:
https://stackoverflow.com/a/46977724/6599076

Errors installing Karma on Mac OS 10.8.5

When I run npm install karma --save-dev, most of the installation goes well, but I get the following errors:
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 12.6.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Volumes/myProject/node_modules/karma/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
> bufferutil#1.1.0 install /Volumes/myProject/node_modules/karma/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
child_process: customFds option is deprecated, use stdio instead.
Error: Can't run /Applications/Xcode.app/usr/bin/xcodebuild (no such file).
Error: Can't run /Applications/Xcode.app/usr/bin/xcodebuild (no such file).
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
I have XCode Version 5.1.1 (5B1008) installed at /Applications/Xcode.app/, but when I Show Contents on the file, it shows a folder named Contents, and no usr directory.
What suggestions can you give to get gyp to install?

npm install -g ember-cli error MSB3191

I am on Windows 8.1 with Visual Studio 2015.
Installing Ember-cli getting following error. has anyone experience it?
C:\Users\[username]\AppData\Roaming\npm\node_modules\ember-cli\node_modules\testem\
node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )
else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targe
ts(312,5): error MSB3491: Could not write lines to file "Release\obj\bufferutil
\bufferutil.tlog\bufferutil.lastbuildstate". The specified path, file name, or
both are too long. The fully qualified file name must be less than 260 characte
rs, and the directory name must be less than 248 characters. [C:\Users\[username]\
AppData\Roaming\npm\node_modules\ember-cli\node_modules\testem\node_modules\soc
ket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules
\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600

Get errors on installation of protractor

I am trying to install protractor, following this guide:
https://angular.github.io/protractor/#/
On ubuntu in a shell, I typed: sudo npm install -g protractor
There is a whole bunch of info telling if the installation of some specific packages went good or not. Here I am getting some error on some packages. I have added the errors, and not added the ones that went well. Anyone has any idea on how to fix this problem.
Thanks for any help you can provide
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-53-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm WARN optional dep failed, continuing bufferutil#1.1.0
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-53-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm WARN optional dep failed, continuing utf-8-validate#1.1.0
/usr/local/bin/webdriver-manager -> /usr/local/lib/node_modules/protractor/bin/webdriver-manager
/usr/local/bin/protractor -> /usr/local/lib/node_modules/protractor/bin/protractor
protractor#2.1.0 /usr/local/lib/node_modules/protractor
├── jasminewd#1.1.0
├── jasminewd2#0.0.5
├── saucelabs#0.1.1
├── html-entities#1.1.2
├── q#1.0.0
├── minijasminenode#1.1.1
├── adm-zip#0.4.4
├── optimist#0.6.1 (wordwrap#0.0.3, minimist#0.0.10)
├── glob#3.2.11 (inherits#2.0.1, minimatch#0.3.0)
├── jasmine#2.3.1 (exit#0.1.2, jasmine-core#2.3.4)
├── accessibility-developer-tools#2.6.0
├── lodash#2.4.2
├── source-map-support#0.2.10 (source-map#0.1.32)
├── request#2.36.0 (aws-sign2#0.5.0, forever-agent#0.5.2, qs#0.6.6, oauth-sign#0.3.0, tunnel-agent#0.4.0, json-stringify-safe#5.0.1, mime#1.2.11, node-uuid#1.4.3, http-signature#0.10.1, form-data#0.1.4, tough-cookie#2.0.0, hawk#1.0.0)
└── selenium-webdriver#2.45.1 (tmp#0.0.24, rimraf#2.4.0, xml2js#0.4.4, ws#0.7.2)
On Ubuntu, the Node command is actually 'nodejs' whereas the Protractor installer is looking for 'node'.
Try running this:
sudo ln -s /usr/bin/nodejs /usr/bin/node
And then re-running the Protractor installation
sudo npm install -g protractor