简体   繁体   中英

Getting error while executing npm install angular-firebase --save

I was working on Angular Project and tried to use Firebase in it for authentication. I created a new project, added some dependencies and used npm install angular-firebase --save to download and install Firebase, but I got a long error which is as follows:

    npm WARN deprecated core-js@2.5.5: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

> grpc@1.10.1 install G:\Angular Stuff\barnd-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.1/node-v72-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.10.1 and node@12.18.2 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for grpc@1.10.1 and node@12.18.2 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
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\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\WINDOWS_BUILD_WARNING.vcxproj]
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\WINDOWS_BUILD_WARNING.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\boringssl.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\boringssl.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\gpr.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\gpr.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\grpc.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\grpc.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\z.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w
as not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [G:\Angular Stuff\barnd-project\node_modules\grpc\build\z.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` 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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=G:\\Angular Stuff\\barnd-project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v72-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=G:\\Angular Stuff\\barnd-project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v72-win32-x64-unknown"
gyp ERR! cwd G:\Angular Stuff\barnd-project\node_modules\grpc
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` 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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! node-pre-gypcommand "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=G:\\Angular Stuff\\barnd-project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v72-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=G:\\Angular Stuff\\barnd-project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v72-win32-x64-unknown"
 gyp ERR!ERR!  build errorcwd
 G:\Angular Stuff\barnd-project\node_modules\grpc
gypnode-pre-gyp  ERR!ERR!  node -vstack v12.18.2
 Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=G:\Angular Stuff\barnd-project\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=G:\Angular Stuff\barnd-project\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown' (1)
gyp node-pre-gypERR!  ERR!node-gyp -v  v5.1.0
stackgyp     at ChildProcess.<anonymous> (G:\Angular Stuff\barnd-project\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
 node-pre-gypERR!  ERR!not ok
stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "G:\\Angular Stuff\\barnd-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 G:\Angular Stuff\barnd-project\node_modules\grpc
node-pre-gyp ERR! node -v v12.18.2
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=G:\Angular Stuff\barnd-project\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=G:\Angular Stuff\barnd-project\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.10.1 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.1 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\user\AppData\Roaming\npm-cache\_logs\2020-07-07T12_11_51_980Z-debug.log

I have installed Windows SDK and node-gyp but still no luck. Both NodeJS and Angular CLI is updated to there latest versions still, it's giving the error.

It seems that your firebase install fails due to grpc.. This can correspond to many differents problems..

A few:

  • Disable your antivirus, few users said that Kapersky can stuck npm install.. See issue on github
  • You can try npm install --build-from-source @grpc/grpc-js
  • Or maybe it's this case

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM