Я погуглил много связанных вопросов, и я потерян, поскольку я новичок в ионике.
Моя версия npm: 6.1.0
Моя версия nodejs: 10.5.0
я клонировал частное хранилище, и первое, что я сделал, это npm i
для установки пакетов.
Затем я столкнулся с ошибкой, когда она достигла здесь:
> grpc@1.10.0 install D:\Projects\...\the-project\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library
И затембыло сброшено куча ошибок:
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 grpc@1.10.0 and node@10.5.0 (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 grpc@1.10.0 and node@10.5.0 (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: 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! grpc@1.10.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.10.0 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
Я гуглил и проверял много постов github / stackoverflow, но я все еще потерян в середине, потому что все решение отличается, и я также не понимаю, что этоfor.
Поэтому мне нужно помочь вам, пожалуйста, посоветуйте, что я должен сделать.
Пока что я сделал следующее:
1) npm install --msvs_version=2013 -g node-inspector
:Ошибка
2) npm config set msvs_version 2013
: нет результата
3) node-pre-gyp install --fallback-to-build
: ошибка 'node-pre-gyp' is not recognized as an internal or external command,
operable program or batch file.