I googled many related question and i am lost as i am a beginner to ionic.
My npm version: 6.1.0
My nodejs version: 10.5.0
i cloned a private repo and the first thing i do is npm i
to install the packages.
Then i encounter the error when it reach here:
> [email protected] install D:\Projects\...\the-project\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library
And then a bunch of error has been throw:
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.0/node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.0/node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python2.7", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (D:\Program File\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (D:\Program File\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at D:\Program File\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:158:21)
gyp ERR! gypSystem Windows_NT 10.0.16299
ERR! configure error
gyp gypERR! commandERR! "D:\\Program File\\nodejs\\node.exe" "D:\\Program File\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=D:\\Projects\\...\\the-project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=D:\\Projects\\...\\the-project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown" "--python=python2.7" "--msvs_version=2013"
stackgyp Error: Can't find Python executable "python2.7", you can set the PYTHON env variable.
gypERR! ERR!cwd D:\Projects\...\the-project\node_modules\grpc
stackgyp at PythonFinder.failNoPython (D:\Program File\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gypERR! ERR!node -v v10.5.0
stackgyp at PythonFinder.<anonymous> (D:\Program File\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gypERR! node-gyp -v v3.6.2
gyp ERR!ERR! stacknot ok at D:\Program File\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:158:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "D:\\Program File\\nodejs\\node.exe" "D:\\Program File\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=D:\\Projects\\...\\the-project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=D:\\Projects\\...\\the-project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown" "--python=python2.7" "--msvs_version=2013"
gyp ERR! cwd D:\Projects\...\the-project\node_modules\grpc
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not oknode-pre-gyp
ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'D:\Program File\nodejs\node.exe D:\Program File\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=D:\Projects\...\the-project\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=D:\Projects\...\the-project\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown --python=python2.7 --msvs_version=2013' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (D:\Projects\...\the-project\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "D:\\Program File\\nodejs\\node.exe" "D:\\Projects\\...\\the-project\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd D:\Projects\...\the-project\node_modules\grpc
node-pre-gyp ERR! node -v v10.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute 'D:\Program File\nodejs\node.exe D:\Program File\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=D:\Projects\Projects\...\the-project\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=D:\Projects\...\IONIC\client app\foodNinjaCustomerApp\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown --python=python2.7 --msvs_version=2013' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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\....\AppData\Roaming\npm-cache\_logs\2018-10-08T10_00_32_262Z-debug.log
I have googled and check many github/stackoverflow post but i am still lost in the middle because all the solution is different and i also don't understand what it is for.
Thus i need help you you, please advise what i have to do.
So far the things i have done is :
1) npm install --msvs_version=2013 -g node-inspector
: Error
2) npm config set msvs_version 2013
: no result
3) node-pre-gyp install --fallback-to-build
: error 'node-pre-gyp' is not recognized as an internal or external command,
operable program or batch file.
The error is stating that python was not found.
gyp ERR! stack Error: Can't find Python executable "python2.7", you can set the PYTHON env variable
.So you should install it (Version 2.7) and add it to the system variables.