Error while creating first project with ionic - ionic-framework

Hi i try to create my first app in ionic and i get this error :
f:\>ionic start bletry3
? What starter would you like to use: blank
✔ Creating directory .\bletry3 - done!
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-
base/archive/master.tar.gz)
✔ Downloading - done!
[INFO] Fetching starter template blank (https://github.com/ionic-
team/ionic2-starter-blank/archive/master.tar.gz)
✔ Downloading - done!
✔ Updating package.json with app details - done!
✔ Creating configuration file ionic.config.json - done!
[INFO] Installing dependencies may take several minutes!
> npm install
✖ Running command - failed!
[ERROR] An error occurred while running npm install (exit code 1):
npm WARN deprecated object-keys#0.2.0: Please update to the latest
object-keys
npm WARN prefer global node-gyp#3.6.2 should be installed with -g
> node-sass#4.5.0 install f:\bletry3\node_modules\node-sass
> node scripts/install.js
Downloading binary from
https://github.com/sass/node-sass/releases/download/v4.5.0/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.0/win32-x64-57_binding.node":
HTTP error 404 Not Found
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
> fsevents#1.1.2 install f:\bletry3\node_modules\fsevents
> node install
> node-sass#4.5.0 postinstall f:\bletry3\node_modules\node-sass
> node scripts/build.js
Building: D:\Program Files\nodejs\node.exe f:\bletry3\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 [ 'D:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'f:\\bletry3\\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.6.2
gyp info using node#8.0.0 | 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 (f:\bletry3\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (f:\bletry3\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (f:\bletry3\node_modules\which\which.js:80:29)
gyp verb `which` failed at f:\bletry3\node_modules\which\which.js:89:16
gyp verb `which` failed at f:\bletry3\node_modules\isexe\index.js:42:5
gyp verb `which` failed at f:\bletry3\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 (f:\bletry3\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (f:\bletry3\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (f:\bletry3\node_modules\which\which.js:80:29)
gyp verb `which` failed at f:\bletry3\node_modules\which\which.js:89:16
gyp verb `which` failed at f:\bletry3\node_modules\isexe\index.js:42:5
gyp verb `which` failed at f:\bletry3\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Python27\python.EXE
gyp verb check python version `C:\Python27\python.EXE -c "import platform;
print(platform.python_version());"` returned: "2.7.13\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.0.0
gyp verb command install [ '8.0.0' ]
gyp verb install input version string "8.0.0"
gyp verb install installing version: 8.0.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.0.0
gyp verb build dir attempting to create "build" dir: f:\bletry3\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? f:\bletry3\node_modules\node-sass\build
gyp verb Not using VS2017: Could not use PowerShell to find VS2017
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: f:\bletry3\node_modules\node-sass\build\config.gypi
gyp verb config.gypi checking for gypi file: f:\bletry3\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: f:\bletry3\node_modules\node-sass\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'f:\\bletry3\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'f:\\bletry3\\node_modules\\node-sass\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'f:\\bletry3\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\MBehtemam\\.node-gyp\\8.0.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\MBehtemam\\.node-gyp\\8.0.0',
gyp info spawn args '-Dnode_gyp_dir=f:\\bletry3\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\MBehtemam\\.node-gyp\\8.0.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=f:\\bletry3\\node_modules\\node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'f:\\bletry3\\node_modules\\node-sass\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\MBehtemam\.node-gyp\8.0.0
gyp verb found first Solution file build/binding.sln
gyp verb could not find "msbuild.exe" in PATH - finding location in registry
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 6/16/2017 2:02:34 PM.
Project "f:\bletry3\node_modules\node-sass\build\binding.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|x64".
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the
.NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to
the system path if it is installed elsewhere. [f:\bletry3\node_modules\node-sass\build\binding.sln]
Done Building Project "f:\bletry3\node_modules\node-sass\build\binding.sln" (default targets) -- FAILED.
Build FAILED.
"f:\bletry3\node_modules\node-sass\build\binding.sln" (default target) (1) ->
(_src_\libsass target) ->
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the
.NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to
the system path if it is installed elsewhere. [f:\bletry3\node_modules\node-sass\build\binding.sln]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.20
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (f:\bletry3\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe"
"f:\\bletry3\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext="
"--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd f:\bletry3\node_modules\node-sass
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN Error: EPERM: operation not permitted, scandir
'f:\bletry3\node_modules\are-we-there-yet\node_modules'
npm WARN { Error: EPERM: operation not permitted, scandir
'f:\bletry3\node_modules\are-we-there-yet\node_modules'
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'scandir',
npm WARN path: 'f:\\bletry3\\node_modules\\are-we-there-yet\\node_modules' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.5.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.5.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\MBehtemam\AppData\Roaming\npm-cache\_logs\2017-06-16T09_32_39_772Z-debug.log
```
and my ionic info is :
```
f:\try>ionic info
[WARN] You are not in an Ionic project directory. Project context may be missing.
global packages:
#ionic/cli-utils : 1.4.0
Ionic CLI : 3.4.0
System:
Node : v8.0.0
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 5.0.0```

So the problem is that ionic is not ready for npm version 5 ,so i uninstall Node version 8 and install Node version 6 LTS and everything work well .

Related

Sass installation error using npm install -D node-sass nodemon

I wanted to install sass for my project when using the command "$ npm install -D node-sass nodemon" in bash console in vsc , I get the following error and I don't really know what it can be.
I'm just taking my first steps in all this so I'm a bit confused, install phyton 3 to see if the error was solved that way but it still continues.
thanks for the help, regards.
error code 1
1425 error path C:\Users\feder\Desktop\newProject\node_modules\node-sass
1426 error command failed
1427 error command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
1428 error Building: C:\Program Files\nodejs\node.exe C:\Users\feder\Desktop\newProject\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
1429 error gyp info it worked if it ends with ok
1429 error gyp verb cli [
1429 error gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
1429 error gyp verb cli 'C:\\Users\\feder\\Desktop\\newProject\\node_modules\\node-gyp\\bin\\node-gyp.js',
1429 error gyp verb cli 'rebuild',
1429 error gyp verb cli '--verbose',
1429 error gyp verb cli '--libsass_ext=',
1429 error gyp verb cli '--libsass_cflags=',
1429 error gyp verb cli '--libsass_ldflags=',
1429 error gyp verb cli '--libsass_library='
1429 error gyp verb cli ]
1429 error gyp info using node-gyp#8.4.1
1429 error gyp info using node#18.12.0 | win32 | x64
1429 error gyp verb command rebuild []
1429 error gyp verb command clean []
1429 error gyp verb clean removing "build" directory
1429 error gyp verb command configure []
1429 error gyp verb find Python Python is not set from command line or npm configuration
1429 error gyp verb find Python Python is not set from environment variable PYTHON
1429 error gyp verb find Python checking if "python3" can be used
1429 error gyp verb find Python - executing "python3" to get executable path
1429 error gyp verb find Python - "python3" is not in PATH or produced an error
1429 error gyp verb find Python checking if "python" can be used
1429 error gyp verb find Python - executing "python" to get executable path
1429 error gyp verb find Python - "python" is not in PATH or produced an error
1429 error gyp verb find Python checking if Python is C:\Users\feder\AppData\Local\Programs\Python\Python39\python.exe
1429 error gyp verb find Python - executing "C:\Users\feder\AppData\Local\Programs\Python\Python39\python.exe" to get version
1429 error gyp verb find Python - "C:\Users\feder\AppData\Local\Programs\Python\Python39\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files\Python39\python.exe
1429 error gyp verb find Python - executing "C:\Program Files\Python39\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files\Python39\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Users\feder\AppData\Local\Programs\Python\Python39-32\python.exe
1429 error gyp verb find Python - executing "C:\Users\feder\AppData\Local\Programs\Python\Python39-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Users\feder\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files\Python39-32\python.exe
1429 error gyp verb find Python - executing "C:\Program Files\Python39-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files\Python39-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
1429 error gyp verb find Python - executing "C:\Program Files (x86)\Python39-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Users\feder\AppData\Local\Programs\Python\Python38\python.exe
1429 error gyp verb find Python - executing "C:\Users\feder\AppData\Local\Programs\Python\Python38\python.exe" to get version
1429 error gyp verb find Python - "C:\Users\feder\AppData\Local\Programs\Python\Python38\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files\Python38\python.exe
1429 error gyp verb find Python - executing "C:\Program Files\Python38\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files\Python38\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Users\feder\AppData\Local\Programs\Python\Python38-32\python.exe
1429 error gyp verb find Python - executing "C:\Users\feder\AppData\Local\Programs\Python\Python38-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Users\feder\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files\Python38-32\python.exe
1429 error gyp verb find Python - executing "C:\Program Files\Python38-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files\Python38-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
1429 error gyp verb find Python - executing "C:\Program Files (x86)\Python38-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Users\feder\AppData\Local\Programs\Python\Python37\python.exe
1429 error gyp verb find Python - executing "C:\Users\feder\AppData\Local\Programs\Python\Python37\python.exe" to get version
1429 error gyp verb find Python - "C:\Users\feder\AppData\Local\Programs\Python\Python37\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files\Python37\python.exe
1429 error gyp verb find Python - executing "C:\Program Files\Python37\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files\Python37\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Users\feder\AppData\Local\Programs\Python\Python37-32\python.exe
1429 error gyp verb find Python - executing "C:\Users\feder\AppData\Local\Programs\Python\Python37-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Users\feder\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files\Python37-32\python.exe
1429 error gyp verb find Python - executing "C:\Program Files\Python37-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files\Python37-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
1429 error gyp verb find Python - executing "C:\Program Files (x86)\Python37-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Users\feder\AppData\Local\Programs\Python\Python36\python.exe
1429 error gyp verb find Python - executing "C:\Users\feder\AppData\Local\Programs\Python\Python36\python.exe" to get version
1429 error gyp verb find Python - "C:\Users\feder\AppData\Local\Programs\Python\Python36\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files\Python36\python.exe
1429 error gyp verb find Python - executing "C:\Program Files\Python36\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files\Python36\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Users\feder\AppData\Local\Programs\Python\Python36-32\python.exe
1429 error gyp verb find Python - executing "C:\Users\feder\AppData\Local\Programs\Python\Python36-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Users\feder\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files\Python36-32\python.exe
1429 error gyp verb find Python - executing "C:\Program Files\Python36-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files\Python36-32\python.exe" could not be run
1429 error gyp verb find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
1429 error gyp verb find Python - executing "C:\Program Files (x86)\Python36-32\python.exe" to get version
1429 error gyp verb find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
1429 error gyp verb find Python checking if the py launcher can be used to find Python 3
1429 error gyp verb find Python - executing "py.exe" to get Python 3 executable path
1429 error gyp verb find Python - executable path is "C:\Users\feder\AppData\Local\Programs\Python\Python311\python.exe"
1429 error gyp verb find Python - executing "C:\Users\feder\AppData\Local\Programs\Python\Python311\python.exe" to get version
1429 error gyp verb find Python - version is "3.11.0"
1429 error gyp info find Python using Python version 3.11.0 found at "C:\Users\feder\AppData\Local\Programs\Python\Python311\python.exe"
1429 error gyp verb get node dir no --target version specified, falling back to host node version: 18.12.0
1429 error gyp verb command install [ '18.12.0' ]
1429 error gyp verb install input version string "18.12.0"
1429 error gyp verb install installing version: 18.12.0
1429 error gyp verb install --ensure was passed, so won't reinstall if already installed
1429 error gyp verb install version is already installed, need to check "installVersion"
1429 error gyp verb got "installVersion" 9
1429 error gyp verb needs "installVersion" 9
1429 error gyp verb install version is good
1429 error gyp verb get node dir target node version installed: 18.12.0
1429 error gyp verb build dir attempting to create "build" dir: C:\Users\feder\Desktop\newProject\node_modules\node-sass\build
1429 error gyp verb build dir "build" dir needed to be created? Yes
1429 error gyp verb find VS msvs_version not set from command line or npm config
1429 error gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
1429 error gyp verb find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
1429 error gyp verb find VS looking for Visual Studio 2015
1429 error gyp verb find VS - not found
1429 error gyp verb find VS not looking for VS2013 as it is only supported up to Node.js 8
1429 error gyp ERR! find VS
1429 error gyp ERR! find VS msvs_version not set from command line or npm config
1429 error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
1429 error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
1429 error gyp ERR! find VS looking for Visual Studio 2015
1429 error gyp ERR! find VS - not found
1429 error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
1429 error gyp ERR! find VS
1429 error gyp ERR! find VS **************************************************************
1429 error gyp ERR! find VS You need to install the latest version of Visual Studio
1429 error gyp ERR! find VS including the "Desktop development with C++" workload.
1429 error gyp ERR! find VS For more information consult the documentation at:
1429 error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
1429 error gyp ERR! find VS **************************************************************
1429 error gyp ERR! find VS
1429 error gyp ERR! configure error
1429 error gyp ERR! stack Error: Could not find any Visual Studio installation to use
1429 error gyp ERR! stack at VisualStudioFinder.fail (C:\Users\feder\Desktop\newProject\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
1429 error gyp ERR! stack at C:\Users\feder\Desktop\newProject\node_modules\node-gyp\lib\find-visualstudio.js:75:16
1429 error gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\feder\Desktop\newProject\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
1429 error gyp ERR! stack at C:\Users\feder\Desktop\newProject\node_modules\node-gyp\lib\find-visualstudio.js:71:14
1429 error gyp ERR! stack at C:\Users\feder\Desktop\newProject\node_modules\node-gyp\lib\find-visualstudio.js:384:16
1429 error gyp ERR! stack at C:\Users\feder\Desktop\newProject\node_modules\node-gyp\lib\util.js:54:7
1429 error gyp ERR! stack at C:\Users\feder\Desktop\newProject\node_modules\node-gyp\lib\util.js:33:16
1429 error gyp ERR! stack at ChildProcess.exithandler (node:child_process:420:5)
1429 error gyp ERR! stack at ChildProcess.emit (node:events:513:28)
1429 error gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
1429 error gyp ERR! System Windows_NT 10.0.19044
1429 error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\feder\\Desktop\\newProject\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
1429 error gyp ERR! cwd C:\Users\feder\Desktop\newProject\node_modules\node-sass
1429 error gyp ERR! node -v v18.12.0
1429 error gyp ERR! node-gyp -v v8.4.1
1429 error gyp ERR! not ok
1429 error Build failed with error code: 1
1430 verbose exit 1
1431 timing npm Completed in 17410ms
1432 verbose unfinished npm timer reify 1666900523859
1433 verbose unfinished npm timer reify:build 1666900538434
1434 verbose unfinished npm timer build 1666900538435
1435 verbose unfinished npm timer build:deps 1666900538435
1436 verbose unfinished npm timer build:run:postinstall 1666900539486
1437 verbose unfinished npm timer build:run:postinstall:node_modules/node-sass 1666900539486
1438 verbose code 1
1439 error A complete log of this run can be found in:
1439 error C:\Users\feder\AppData\Local\npm-cache\_logs\2022-10-27T19_55_23_724Z-debug-0.log

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

TypeError: msg.trim is not a function in Ionic project

I am trying to start my first Ionic project following theses steps : Ionic framework get started page
But when I am writing in the terminal ionic serve (step 3) I have got this error message even if I run the Development server at http://localhost:8100 (my app is running but I still got this error message):
TypeError: msg.trim is not a function
at Logger.log (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/utils/logger.js:78:21)
at Logger.error (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/utils/logger.js:35:14)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/dist/index.js:261:22)
at throw (native)
at rejected (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:94:69)
Also during the setup when I write the command sudo ionic start myApp tabs I have got this : Running command - failed! [ERROR] An error occurred while running npm install (exit code 1):
Complete Error message in the the terminal (I am on macOS) is:
npm WARN deprecated babili#0.1.2: babili has been renamed to
babel-minify. Please update to babel-minify
npm WARN deprecated babel-preset-babili#0.1.4: babili has been renamed
to babel-minify. Please update to babel-preset-minify
npm WARN deprecated object-keys#0.2.0: Please update to the latest
object-keys
> fsevents#1.1.2 install
/Users/emilio/TestIonic/myApp/node_modules/fsevents
> node install
[fsevents] Success:
"/Users/emilio/TestIonic/myApp/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node"
already installed
Pass --update-binary to reinstall or --build-from-source to recompile
> node-sass#4.5.3 install
/Users/emilio/TestIonic/myApp/node_modules/node-sass
> node scripts/install.js
Unable to save binary
/Users/emilio/TestIonic/myApp/node_modules/node-sass/vendor/darwin-x64-48
: { Error: EACCES: permission denied, mkdir
'/Users/emilio/TestIonic/myApp/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.mkdirSync (fs.js:924:18)
at sync
(/Users/emilio/TestIonic/myApp/node_modules/mkdirp/index.js:71:13)
at Function.sync
(/Users/emilio/TestIonic/myApp/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary
(/Users/emilio/TestIonic/myApp/node_modules/node-sass/scripts/install.js:111:11)
at Object.<anonymous>
(/Users/emilio/TestIonic/myApp/node_modules/node-sass/scripts/install.js:154:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/Users/emilio/TestIonic/myApp/node_modules/node-sass/vendor' }
> uglifyjs-webpack-plugin#0.4.6 postinstall
/Users/emilio/TestIonic/myApp/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
> node-sass#4.5.3 postinstall
/Users/emilio/TestIonic/myApp/node_modules/node-sass
> node scripts/build.js
Building: /usr/local/bin/node
/Users/emilio/TestIonic/myApp/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 [ '/usr/local/bin/node',
gyp verb cli
'/Users/emilio/TestIonic/myApp/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.6.2
gyp info using node#6.11.3 | darwin | 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
(/Users/emilio/TestIonic/myApp/node_modules/which/which.js:13:12)
gyp verb `which` failed at F
(/Users/emilio/TestIonic/myApp/node_modules/which/which.js:68:19)
gyp verb `which` failed at E
(/Users/emilio/TestIonic/myApp/node_modules/which/which.js:80:29)
gyp verb `which` failed at
/Users/emilio/TestIonic/myApp/node_modules/which/which.js:89:16
gyp verb `which` failed at
/Users/emilio/TestIonic/myApp/node_modules/isexe/index.js:42:5
gyp verb `which` failed at
/Users/emilio/TestIonic/myApp/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:123:15)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError
(/Users/emilio/TestIonic/myApp/node_modules/which/which.js:13:12)
gyp verb `which` failed at F
(/Users/emilio/TestIonic/myApp/node_modules/which/which.js:68:19)
gyp verb `which` failed at E
(/Users/emilio/TestIonic/myApp/node_modules/which/which.js:80:29)
gyp verb `which` failed at
/Users/emilio/TestIonic/myApp/node_modules/which/which.js:89:16
gyp verb `which` failed at
/Users/emilio/TestIonic/myApp/node_modules/isexe/index.js:42:5
gyp verb `which` failed at
/Users/emilio/TestIonic/myApp/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:123:15)
gyp verb `which` failed stack: 'Error: not found: python2\n at
getNotFoundError
(/Users/emilio/TestIonic/myApp/node_modules/which/which.js:13:12)\n
at F (/Users/emilio/TestIonic/myApp/node_modules/which/which.js:68:19)\n
at E
(/Users/emilio/TestIonic/myApp/node_modules/which/which.js:80:29)\n
at /Users/emilio/TestIonic/myApp/node_modules/which/which.js:89:16\n
at /Users/emilio/TestIonic/myApp/node_modules/isexe/index.js:42:5\n
at /Users/emilio/TestIonic/myApp/node_modules/isexe/mode.js:8:5\n at
FSReqWrap.oncomplete (fs.js:123:15)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the
PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `/usr/bin/python -c "import platform;
print(platform.python_version());"` returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to
host node version: 6.11.3
gyp verb command install [ '6.11.3' ]
gyp verb install input version string "6.11.3"
gyp verb install installing version: 6.11.3
gyp verb install --ensure was passed, so won't reinstall if already
installed
gyp verb install version is already installed, need to check
"installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 6.11.3
gyp verb build dir attempting to create "build" dir:
/Users/emilio/TestIonic/myApp/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir
'/Users/emilio/TestIonic/myApp/node_modules/node-sass/build'
gyp ERR! stack at Error (native)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node"
"/Users/emilio/TestIonic/myApp/node_modules/node-gyp/bin/node-gyp.js"
"rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags="
"--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/emilio/TestIonic/myApp/node_modules/node-sass
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.5.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.5.3 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! /Users/emilio/.npm/_logs/2017-09-25T08_05_30_711Z-debug.log
Thanks in advance
Try this it worked for me. Having Ionic Pro helps as well
npm install ionic-angular#latest --save
npm install #ionic/app-scripts#latest --save-dev
Please update npm to npm 3.x. You can follow the instructions here: https://docs.npmjs.com/getting-started/installing-node#updating-npm
Let me know if that fixes it for you!
Ionic version update to 3.7,
my problem solved

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

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

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?