Node-gyp: NPM fails on msbuild.exe with exit code 1

Created on 6 Aug 2012  Β·  47Comments  Β·  Source: nodejs/node-gyp

The printout from cmd:

C:\Users\Gilbert>cd webstormprojects/nodeofgames

C:\Users\Gilbert\WebstormProjects\NodeOfGames>npm install bcrypt --save
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> [email protected] install C:\Users\Gilbert\WebstormProjects\NodeOfGames\node_module
s\bcrypt
> node-gyp rebuild


C:\Users\Gilbert\WebstormProjects\NodeOfGames\node_modules\bcrypt>node "C:\Progr
am Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node
-gyp\bin\node-gyp.js" rebuild
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(29
7,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.
  TargetFrameworkVersion or PlatformToolset may be set to an invalid version nu
mber. [C:\Users\Gilbert\WebstormProjects\NodeOfGames\node_modules\bcrypt\build\
bcrypt_lib.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp
.Win32.Targets(147,5): error MSB6006: "CL.exe" exited with code -1073741515. [C
:\Users\Gilbert\WebstormProjects\NodeOfGames\node_modules\bcrypt\build\bcrypt_l
ib.vcxproj]
gyp ERR! rebuild error Error: `C:\windows\Microsoft.NET\Framework\v4.0.30319\msb
uild.exe` failed with exit code: 1
gyp ERR! rebuild error     at ChildProcess.onExit (C:\Program Files (x86)\nodejs
\node_modules\npm\node_modules\node-gyp\lib\build.js:214:23)
gyp ERR! rebuild error     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt" "--save"

npm ERR! cwd C:\Users\Gilbert\WebstormProjects\NodeOfGames
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Gilbert\WebstormProjects\NodeOfGames\npm-debug.log
npm ERR! not ok code 0

C:\Users\Gilbert\WebstormProjects\NodeOfGames>
Node Sass --> Dart Sass

Most helpful comment

I also faced same Error on MSBuild.exe with Window 7 and window 10 64bit machine. I had tried number of attempt with installation of windows-build-tools global but got repeated failure. But when i install windows-build-tools local folder, i got the success. ( npm install --production windows-build-tools )

All 47 comments

Which version of node-gyp?

$ node-gyp -v

How would I find out?

Which version of node-gyp?

$ node-gyp -v

Reply to this email directly or view it on GitHub:
https://github.com/TooTallNate/node-gyp/issues/119#issuecomment-7532589

$ cd "C:\Program Files (x86)\nodejs"
$ npm ls

Show me the output there.

Ok so try updating node-gyp. From that same directory:

$ npm install node-gyp

C:\Program Files (x86)\nodejs>npm install node-gyp
npm http GET https://registry.npmjs.org/node-gyp
npm http 200 https://registry.npmjs.org/node-gyp
npm http GET https://registry.npmjs.org/node-gyp/-/node-gyp-0.6.3.tgz
npm http 200 https://registry.npmjs.org/node-gyp/-/node-gyp-0.6.3.tgz
npm ERR! Error: EPERM, mkdir 'C:\Program Files (x86)\nodejs\node_modules\node-gy
p'
npm ERR! { [Error: EPERM, mkdir 'C:\Program Files (x86)\nodejs\node_modules\nod
e-gyp']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\Program Files (x86)\nodejs\node_modulesnode-gyp',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: 'C:\Program Files (x86)\nodejs\node_modules\node-gy
p',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ 'DirWriter._create (C:\Program Files (x86)\nodejs\node_modules\
\npm\node_modules\fstream\lib\dir-writer.js:36:23)',
npm ERR! 'C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\
\mkdirp\index.js:45:53',
npm ERR! 'Object.oncomplete (fs.js:297:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program File
s (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-gyp"
npm ERR! cwd C:\Program Files (x86)\nodejs
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! path C:\Program Files (x86)\nodejs\node_modulesnode-gyp
npm ERR! fstream_path C:\Program Files (x86)\nodejs\node_modulesnode-gyp
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EPERM
npm ERR! message EPERM, mkdir 'C:\Program Files (x86)\nodejs\node_modules\node-g
yp'
npm ERR! errno 50
npm ERR! fstream_stack DirWriter._create (C:\Program Files (x86)\nodejs\node_mod
ules\npm\node_modules\fstream\lib\dir-writer.js:36:23)
npm ERR! fstream_stack C:\Program Files (x86)\nodejs\node_modules\npm\node_modul
es\mkdirp\index.js:45:53
npm ERR! fstream_stack Object.oncomplete (fs.js:297:15)
npm ERR! 50 errno
npm ERR! Error: EPERM, open 'C:\Program Files (x86)\nodejs\npm-debug.log'
npm ERR! { [Error: EPERM, open 'C:\Program Files (x86)\nodejs\npm-debug.log']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\Program Files (x86)\nodejs\npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program File
s (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-gyp"
npm ERR! cwd C:\Program Files (x86)\nodejs
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! path C:\Program Files (x86)\nodejs\npm-debug.log
npm ERR! code EPERM
npm ERR! message EPERM, open 'C:\Program Files (x86)\nodejs\npm-debug.log'
npm ERR! errno 50
npm ERR! 50 errno
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Program Files (x86)\nodejs\npm-debug.log
npm ERR! not ok code 0

C:\Program Files (x86)\nodejs>

Oh, sorry, you need to do that from a Command Prompt with Administrator privileges. Right click on cmd and do "run as administrator" and try again.

I saw that just after posting:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\windows\system32>cd "C:\Program Files (x86)\nodejs"

C:\Program Files (x86)\nodejs>npm install node-gyp
npm http GET https://registry.npmjs.org/node-gyp
npm http 200 https://registry.npmjs.org/node-gyp
npm http GET https://registry.npmjs.org/node-gyp/-/node-gyp-0.6.3.tgz
npm http 200 https://registry.npmjs.org/node-gyp/-/node-gyp-0.6.3.tgz
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/osenv
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/npmlog
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/which
npm http 200 https://registry.npmjs.org/graceful-fs
npm http 200 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.10.tgz
npm http 200 https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/fstream/-/fstream-0.1.18.tgz
npm http 200 https://registry.npmjs.org/nopt
npm http 200 https://registry.npmjs.org/osenv
npm http GET https://registry.npmjs.org/osenv/-/osenv-0.0.3.tgz
npm http GET https://registry.npmjs.org/nopt/-/nopt-2.0.0.tgz
npm http 200 https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/rimraf/-/rimraf-2.0.2.tgz
npm http 200 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/minimatch/-/minimatch-0.2.5.tgz
npm http 200 https://registry.npmjs.org/glob
npm http 200 https://registry.npmjs.org/npmlog
npm http GET https://registry.npmjs.org/npmlog/-/npmlog-0.0.2.tgz
npm http GET https://registry.npmjs.org/glob/-/glob-3.1.11.tgz
npm http 200 https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/semver/-/semver-1.0.14.tgz
npm http 200 https://registry.npmjs.org/tar
npm http 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.10.tgz
npm http 200 https://registry.npmjs.org/fstream/-/fstream-0.1.18.tgz
npm http GET https://registry.npmjs.org/tar/-/tar-0.1.13.tgz
npm http 200 https://registry.npmjs.org/which
npm http 200 https://registry.npmjs.org/osenv/-/osenv-0.0.3.tgz
npm http GET https://registry.npmjs.org/which/-/which-1.0.5.tgz
npm http 200 https://registry.npmjs.org/request
npm http 200 https://registry.npmjs.org/minimatch/-/minimatch-0.2.5.tgz
npm http 200 https://registry.npmjs.org/nopt/-/nopt-2.0.0.tgz
npm http GET https://registry.npmjs.org/request/-/request-2.9.203.tgz
npm http 200 https://registry.npmjs.org/rimraf/-/rimraf-2.0.2.tgz
npm http 200 https://registry.npmjs.org/npmlog/-/npmlog-0.0.2.tgz
npm http 200 https://registry.npmjs.org/glob/-/glob-3.1.11.tgz
npm http 200 https://registry.npmjs.org/semver/-/semver-1.0.14.tgz
npm http 200 https://registry.npmjs.org/tar/-/tar-0.1.13.tgz
npm http 200 https://registry.npmjs.org/which/-/which-1.0.5.tgz
npm http 200 https://registry.npmjs.org/request/-/request-2.9.203.tgz
npm http GET https://registry.npmjs.org/ansi
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/block-stream
npm http 200 https://registry.npmjs.org/abbrev
npm http 200 https://registry.npmjs.org/ansi
npm http GET https://registry.npmjs.org/abbrev/-/abbrev-1.0.3.tgz
npm http 200 https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/ansi/-/ansi-0.1.2.tgz
npm http GET https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz
npm http 200 https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/lru-cache
npm http 200 https://registry.npmjs.org/abbrev/-/abbrev-1.0.3.tgz
npm http GET https://registry.npmjs.org/lru-cache/-/lru-cache-1.1.1.tgz
npm http 200 https://registry.npmjs.org/block-stream
npm http 200 https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz
npm http GET https://registry.npmjs.org/block-stream/-/block-stream-0.0.6.tgz
npm http 200 https://registry.npmjs.org/ansi/-/ansi-0.1.2.tgz
npm http 200 https://registry.npmjs.org/lru-cache/-/lru-cache-1.1.1.tgz
npm http 200 https://registry.npmjs.org/block-stream/-/block-stream-0.0.6.tgz
npm WARN prefer global [email protected] should be installed with -g
[email protected] node_modulesnode-gyp
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])

C:\Program Files (x86)\nodejs>

So does installing bcrypt work now?

Should I do this as administrator?

Not strictly necessary, as long as you do it somewhere where the regular
user has write access to.

On Mon, Aug 6, 2012 at 1:02 PM, Gilbert Bishop-White <
[email protected]> wrote:

Should I do this as administrator?

β€”
Reply to this email directly or view it on GitHubhttps://github.com/TooTallNate/node-gyp/issues/119#issuecomment-7534056.

c:\Users\Gilbert\WebstormProjects\NodeOfGames>npm install bcrypt --save
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

[email protected] install c:\Users\Gilbert\WebstormProjects\NodeOfGames\node_module
s\bcrypt
node-gyp rebuild

c:\Users\Gilbert\WebstormProjects\NodeOfGames\node_modules\bcrypt>node "C:\Progr
am Files (x86)\nodejs\node_modules\npm\binnode-gyp-bin....\node_modules\node
-gyp\binnode-gyp.js" rebuild
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(29
7,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.
TargetFrameworkVersion or PlatformToolset may be set to an invalid version nu
mber. [c:\Users\Gilbert\WebstormProjects\NodeOfGames\node_modules\bcrypt\build\
bcrypt_lib.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp
.Win32.Targets(147,5): error MSB6006: "CL.exe" exited with code -1073741515. [c
:\Users\Gilbert\WebstormProjects\NodeOfGames\node_modules\bcrypt\build\bcrypt_l
ib.vcxproj]
gyp ERR! rebuild error Error: C:\windows\Microsoft.NET\Framework\v4.0.30319\msb uild.exe failed with exit code: 1
gyp ERR! rebuild error at ChildProcess.onExit (C:\Program Files (x86)\nodejs
\node_modules\npm\node_modulesnode-gyp\lib\build.js:214:23)
gyp ERR! rebuild error at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error at Process._handle.onexit (child_process.js:674:10)
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program File
s (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "bcrypt" "--save"

npm ERR! cwd c:\Users\Gilbert\WebstormProjects\NodeOfGames
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: node-gyp rebuild
npm ERR! message cmd "/c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\Users\Gilbert\WebstormProjects\NodeOfGames\npm-debug.log
npm ERR! not ok code 0

c:\Users\Gilbert\WebstormProjects\NodeOfGames>

I mean there's just something up with your setup. Are you sure you have MSVC and the Windows 7 SDK installed as shown in the installation section of the README? https://github.com/TooTallNate/node-gyp#installation

I have installed MSVC and Windows 7 SDK and now get this error:

c:\Users\Gilbert\WebstormProjects\NodeOfGames>npm install bcrypt --save
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> [email protected] install c:\Users\Gilbert\WebstormProjects\NodeOfGames\node_module
s\bcrypt
> node-gyp rebuild


c:\Users\Gilbert\WebstormProjects\NodeOfGames\node_modules\bcrypt>node "C:\Progr
am Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node
-gyp\bin\node-gyp.js" rebuild
  blowfish.cc
  bcrypt.cc
  bcrypt_node.cc
c:\users\gilbert\.node-gyp\0.8.1\src\node_object_wrap.h(57): warning C4251: 'no
de::ObjectWrap::handle_' : class 'v8::Persistent<T>' needs to have dll-interfac
e to be used by clients of class 'node::ObjectWrap' [c:\Users\Gilbert\WebstormP
rojects\NodeOfGames\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
          with
          [
              T=v8::Object
          ]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [c:\Users\Gilbert\WebstormProjects\NodeOfGames\node_modules\bcryp
t\build\bcrypt_lib.vcxproj]
c:\users\gilbert\.node-gyp\0.8.1\deps\openssl\openssl\include\openssl\../../e_o
s2.h(56): fatal error C1083: Cannot open include file: 'openssl/opensslconf.h':
 No such file or directory [c:\Users\Gilbert\WebstormProjects\NodeOfGames\node_
modules\bcrypt\build\bcrypt_lib.vcxproj]
gyp ERR! rebuild error Error: `C:\windows\Microsoft.NET\Framework\v4.0.30319\msb
uild.exe` failed with exit code: 1
gyp ERR! rebuild error     at ChildProcess.onExit (C:\Program Files (x86)\nodejs
\node_modules\npm\node_modules\node-gyp\lib\build.js:214:23)
gyp ERR! rebuild error     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt" "--save"

npm ERR! cwd c:\Users\Gilbert\WebstormProjects\NodeOfGames
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     c:\Users\Gilbert\WebstormProjects\NodeOfGames\npm-debug.log
npm ERR! not ok code 0

c:\Users\Gilbert\WebstormProjects\NodeOfGames>

Did you install OpenSSL as the node-bcrypt README says? https://github.com/ncb000gt/node.bcrypt.js#dependencies

which version of Openssl should I install?

Nathan Rajlich wrote:

Did you install OpenSSL as then node-bcrypt README says?
https://github.com/ncb000gt/node.bcrypt.js#dependencies

β€”
Reply to this email directly or view it on GitHub
https://github.com/TooTallNate/node-gyp/issues/119#issuecomment-7536359.

Honestly I don't know, you're gonna have to figure that out.

i've installed Openssl but there's no change, the lines:

c:\users\gilbert.node-gyp\0.8.1\deps\openssl\openssl\include\openssl../../e_os2.h(56):
fatal
error C1083: Cannot open include file: 'openssl/opensslconf.h':
No such file or directory
[c:\Users\Gilbert\WebstormProjects\NodeOfGames\node_
modules\bcrypt\build\bcrypt_lib.vcxproj]

are red

Nathan Rajlich wrote:

Honestly I don't know, you're gonna have to figure that out.

β€”
Reply to this email directly or view it on GitHub
https://github.com/TooTallNate/node-gyp/issues/119#issuecomment-7536455.

I'm sorry, this is a bcrypt issue at this point. You'll need to open an issue over at that repo.

Thankyou for your help

Nathan Rajlich wrote:

I'm sorry, this is a bcrypt issue at this point. You'll need to open
an issue over at that repo.

β€”
Reply to this email directly or view it on GitHub
https://github.com/TooTallNate/node-gyp/issues/119#issuecomment-7537267.

Hi @TooTallNate, I also have that error when, in my case, trying to install Gulp. At some point I get:

> [email protected] install C:\Program Files\nodejs\node_modules\gulp\node_modules\vinyl-fs\node_modules\glob-watcher\node_modules\gaze
> node-gyp rebuild


C:\Program Files\nodejs\node_modules\gulp\node_modules\vinyl-fs\node_modules\glob-watcher\node_modules\gaze>node "C:\Program Files\nodejs\node_modules\npm\bin\n
ode-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermΓΆglichen, mΓΌssen Sie den Schalter "/m" hinzufΓΌgen.
MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK
for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008.  [C:\Program Files\nodejs\node_modules\gulp\node_modules\vinyl-fs\n
ode_modules\glob-watcher\node_modules\gaze\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.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:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\gulp\node_modules\vinyl-fs\node_modules\glob-watcher\node_modules\gaze
gyp ERR! node -v v0.10.13
gyp ERR! node-gyp -v v0.10.2
gyp ERR! not ok
unbuild [email protected]
unbuild [email protected]
unbuild [email protected]
unbuild [email protected]
npm ERR! weird error 1

Could you please provide some information what I could do? Installed is VS Express 2013.

Thanks a lot!

oh boy, nevermind: updating Everythingβ„’ to the latest version worked out well _shame_.
Thanks anyway and have a nice weekend! TGIF yay.

Hi, I am facing issue in npm install bufferutil *_. It's giving the error *_msbuild failed with exit code 1
I have done all the things mentioned by @mousetraps for node gyp issue.
I have latest version of node (v6. 3. 1), npm(v3. 10. 3), node gyp(v3. 3. 1) installed on my windows 7 machine.

Done following steps for node gyp issue.

1.Install VC++ Build Tools Technical Preview, choose Custom Install, and select both Windows 8.1 and Windows 10 SDKs.

2.Install Python 2.7, and add it to your PATH

3.npm config set python python2.7 --global

4.npm config set python C:\Python27\python.exe --global

5.npm config set msvs_version 2015 --global

6.set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140

Errors:
msbuild error.txt

Please help

Check that your VS actually has C++ installed (just an option in Community editions) try https://www.visualstudio.com/downloads/ near the bottom of the page for the installer to be on the safe side.

I am with a Windows 10 (64 bit) computer and I have experienced the very same issue. I managed to get it solved and here are my key steps taken:

1) Install the latest versions of Python (it may not be relatedπŸ˜…), and "Microsoft Visual C++ Redistributable for Visual Studio 2017", and of course, Node.js and NPM;
2) As Admin:
$ cd "C:\Program Files\nodejs\node_modules\npm"
$ npm install node-gyp
3) $ npm config set msvs_version 2015 --global
Note that I have VS 2017, but configuring it as ver 2017 won't work. Not sure why.
4) As Admin:
$ npm install -g node-sass
And finally, one last check:
$ node-sass -v

Hope this can help you solve your problem. πŸ˜„

I also faced same Error on MSBuild.exe with Window 7 and window 10 64bit machine. I had tried number of attempt with installation of windows-build-tools global but got repeated failure. But when i install windows-build-tools local folder, i got the success. ( npm install --production windows-build-tools )

Thanks ganesh buddy, you have save my day,. i have spent for almost 2days,

npm install --production windows-build-tools

Finally its working now man, thanks.

Below i have posted my error and issue :+1:

C:\Users\Administrator\Downloads\New\radio>npm install xml2json

> [email protected] install C:\Users\Administrator\Downloads\New\radio\node_modu
les\node-expat
> node-gyp rebuild

C:\Users\Administrator\Downloads\New\radio\node_modules\node-expat>if not defined npm_config_node_gyp (node "C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild)  else (node "" rebuild )Warning: Missing input files:C:\Users\Administrator\Downloads\New\radio\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\libexpat\version.c
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  xmlparse.c
  xmltok.c
  xmlrole.c
  win_delay_load_hook.cc
  expat.vcxproj -> C:\Users\Administrator\Downloads\New\radio\node_modules\node
  -expat\build\Release\\libexpat.lib
  node-expat.cc
  win_delay_load_hook.cc
C:\Users\Administrator\Downloads\New\radio\node_modules\nan\nan.h(76): fatal er
ror C1060: compiler is out of heap space (..\node-expat.cc) [C:\Users\Administr
ator\Downloads\New\radio\node_modules\node-expat\build\node_expat.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:\Users\Administrator\AppData\Roamin
g\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:219:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Adminis
trator\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\n
ode-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Administrator\Downloads\New\radio\node_modules\node-expat
gyp ERR! node -v v6.11.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
[email protected] C:\Users\Administrator\Downloads\New\radio
`-- (empty)

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Administra
tor\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "xml2j
son"
npm ERR! node v6.11.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-expat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Administrator\Downloads\New\radio\npm-debug.log
npm ERR! code 1

ganeshkatore comment

Just wanted to say that following TooTallNate's suggestion worked for me with the same problem just now (although my node is located at C:\Program Files\nodejs). Didn't need to install windows-build-tools locally.

The real problem of this issue is variable setup , the "VCTargetsPath" 's variable was difference between window server and window 10.

If you used window 10, it need to set "VCTargetsPath" with
set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140

If you used widows server above command, it will give you some error then you need to set this variable via window system tool: System Properties>Environment Variables>System variables>New

Then you need to set variable to VCTargetsPath and value is
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140

PS C:\Users\Pavan\Desktop\TodayServer> npm install

> [email protected] install C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules\fs-ext
> node-gyp configure build


C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules\fs-ext>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  fs-ext.cc
  win_delay_load_hook.cc
..\fs-ext.cc(108): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules
\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Pavan\Desktop\TodayServer\node_modules\nan\nan.h(862): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(195): error C3861: 'fcntl': identifier not found [C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules\fs-ext\build\fs-ext.v
cxproj]
..\fs-ext.cc(297): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules
\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Pavan\Desktop\TodayServer\node_modules\nan\nan.h(862): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(339): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules
\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Pavan\Desktop\TodayServer\node_modules\nan\nan.h(862): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(374): error C3861: 'fcntl': identifier not found [C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules\fs-ext\build\fs-ext.v
cxproj]
..\fs-ext.cc(375): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules
\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Pavan\Desktop\TodayServer\node_modules\nan\nan.h(862): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(433): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules
\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Pavan\Desktop\TodayServer\node_modules\nan\nan.h(862): note: see declaration of 'Nan::NanErrnoException'
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:262: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.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" "configure" "build"
gyp ERR! cwd C:\Users\Pavan\Desktop\TodayServer\node_modules\qlobber-fsq\node_modules\fs-ext
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\qlobber-fsq\node_modules\fs-ext):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp configure build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

audited 2344 packages in 10.19s
found 3 vulnerabilities (2 low, 1 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details

```
Please Help me to fix this!! :(


What is OS that you try to install?

Caused by node-sass generally.
So you should do this in your project directory.

First,

npm un node-sass 
// or
yarn remove node-sass

Then,

npm i node-sass --save-dev
// or
yarn add node-sass --dev

In my case this issue appeared when I moved from Node v.6 to Node v.10. Fixed by updating project dependencies from package.json to be compatible with latest node. For example bcrypt from v.2 to v.3 etc...

@soakit thank you, it`s work

none of this solutions are working, i am using visual studio 2017. can anyone help me for this issue?

getting error like : gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibbuild.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:appLatestappLatestnode_modulesvoicemeeternode_modulesffi
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules7zip-bin-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
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:UsersalliancetekAppDataRoamingnpm-cache_logs2019-02-05T10_55_54_298Z-debug.log

none of this solutions are working, i am using visual studio 2017. can anyone help me for this issue?

In VSTS we tried adding "Node Tool Installer" to always select latest node version. It worked.

Facing the same issue in Jenkins. tried installing node-gyp, node-sass and setting VCTargetsPath. None of these worked.

i have this error
i an trying install expo-cli and i gain this
c:usersamgadappdataroamingnpmnode_modulesexpo-clinode_modulessharpsrcstats.cc(130): error C2661: 'v8::Object
::Set': no overloaded function takes 2 arguments [C:UsersamgadAppDataRoamingnpmnode_modulesexpo-clinode_modules
sharpbuildsharp.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibbuild.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:UsersamgadAppDataRoamingnpmnode_modulesexpo-clinode_modulessharp
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok

I'm having the same issue as above when installing expo-cli

c:usersdpdanappdataroamingnpmnode_modulesexpo-clinode_modulessharpsrcstats.cc(130): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:UsersdpdanAppD
ataRoamingnpmnode_modulesexpo-clinode_modulessharpbuildsharp.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:UsersdpdanAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibbuild.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\dpdan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:UsersdpdanAppDataRoamingnpmnode_modulesexpo-clinode_modulessharp
gyp ERR! node -v v13.1.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok

Hi,

If i tried npm i it will throw this below error i have tried

npm install

npm install --production windows-build-tools

image

Hi,

I need to do this website for this organization and I need to re-use some code by other, more professional developers who use these amazing, futuristic tools, Today is something like a fifth day I had to spend dealing with all these npm and yarn and whatever else is needed for modern website development.

I tried using clean Fedora Environment, but then yarn tries to install this node-gyp... But oh no, Fedora uses a Python that's too new. I tried modifying configuration.js, but it's being overwritten every time you run yarn install, yay! Installing additional pythons does not help either.

So maybe it would work on Windows? Maybe it would, but now I'm getting different number of warnings and errors every time although the install consistently crashes due to the error with msbuild.exe

I'm not looking for help, (I'll install Windows XP and I'm sure that will do the trick) but I wanted to share my disappointment.

Support for Windows XP ended in 2014!

If you are using node v13 or later it may not work due to node-sass being buggy.

Try using nvm and change to an earlier version of node. I tried with node v10 and it worked fine.

I got a similar issue, but trying to install quick.db.

C:\Users\noahg>npm i quick.db

> [email protected] install C:\Users\noahg\node_modules\integer
> prebuild-install || npm run build-release

prebuild-install WARN install No prebuilt binaries found (target=12.18.2 runtime=node arch=x64 libc= platform=win32)

> [email protected] build-release C:\Users\noahg\node_modules\integer
> node-gyp rebuild --release


C:\Users\noahg\node_modules\integer>if not defined npm_config_node_gyp (node "C:\Users\noahg\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )  else (node "C:\Users\noahg\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  integer.cpp
  win_delay_load_hook.cc
c:\users\noahg\node_modules\integer\src\integer.cpp(370): warning C4804: '-': unsafe use of type 'bool' in operation [C
:\Users\noahg\node_modules\integer\build\integer.vcxproj]
C:\\Users\\noahg\\AppData\\Local\\node-gyp\\Cache\\12.18.2\\x64\\node.lib : fatal error LNK1106: invalid file or disk f
ull: cannot seek to 0x2FCF10 [C:\Users\noahg\node_modules\integer\build\integer.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\noahg\AppData\Roaming\npm\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.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\noahg\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\Users\noahg\node_modules\integer
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-release: `node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\noahg\AppData\Roaming\npm-cache\_logs\2020-07-31T17_12_16_367Z-debug.log
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\noahg\package.json'
npm WARN noahg No description
npm WARN noahg No repository field.
npm WARN noahg No README data
npm WARN noahg No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || npm run build-release`
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\noahg\AppData\Roaming\npm-cache\_logs\2020-07-31T17_12_16_627Z-debug.log

I installed all the build tools but I am unsure what to do now.

Try using nvm and change to an earlier version of node. I tried with node v10 and it worked fine.

when someone (like me) use Discord.js v12, Node.js v13+ is required

Was this page helpful?
0 / 5 - 0 ratings