1

I was trying to install angularfire2 and firebase with npm like this

$ npm install angularfire2 firebase --save

The problem I am getting is

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 (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\New\\Documents\\academy\\academy\\node_modules\\grpc\\src\\node\\extension_binary\\node-v57-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\New\\Documents\\academy\\academy\\node_modules\\grpc\\src\\node\\extension_binary\\node-v57-win32-x64-unknown"
gyp ERR! cwd C:\Users\New\Documents\academy\academy\node_modules\grpc
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\New\Documents\academy\academy\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\New\Documents\academy\academy\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\New\Documents\academy\academy\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\New\\Documents\\academy\\academy\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Users\New\Documents\academy\academy\node_modules\grpc
node-pre-gyp ERR! node -v v8.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\New\Documents\academy\academy\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\New\Documents\academy\academy\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown' (1)
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.12.9 but none is installed. You must install peer dependencies yourself.
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`ild --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.                  ditional logging output above.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:                T15_46_21_982Z-debug.log
npm ERR!     C:\Users\New\AppData\Roaming\npm-cache\_logs\2018-04-03T15_46_21_982Z-debug.log

I have looked at the documentation and there was a post that mentioned something about the version of [email protected] not being good . I don't know if it was related to my specific problem I am using angular 5 and node 8.10 my version of npm is 5.6.0 any knowledge on problems here would be greatly appreciated. For people having a similar problem I am also looking into using a cdn for firebase (haven't fully done my research on it so don't take my word for it).

2
  • Can you look at the npm log file mentioned in that error and show is the first block of lines that start with "node-pre-gyp" and mention "grpc"? I think there may be relevant information there. Commented Apr 4, 2018 at 15:57
  • for some odd reason it started working I have no Idea why Commented Apr 5, 2018 at 0:32

2 Answers 2

3

Use this command

npm install angularfire2  [email protected] --save
Sign up to request clarification or add additional context in comments.

Comments

1

If you look closely you will see this error:

Traceback (most recent call last): File "./gyp-mac-tool", line 611, in sys.exit(main(sys.argv[1:])) File "./gyp-mac-tool", line 28, in main exit_code = executor.Dispatch(args) File "./gyp-mac-tool", line 43, in Dispatch return getattr(self, method)(*args[1:]) File "./gyp-mac-tool", line 246, in ExecFilterLibtool if not libtool_re.match(line) and not libtool_re5.match(line): TypeError: cannot use a string pattern on a bytes-like object

That is a python error. Make sure you have python 2.7 on your path and not 3.x as this tool doesn't support 3.x.

1 Comment

This might be the reason it started to work suddenly thanks I looked further into gyp you are actually supposed to run a command before to load the dependencies for gyp in an admin role. I did this and this could be the reason why it suddenly started to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.