Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSB4148: The name of a property stored under the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" has zero length #1598

Closed
glaucia86 opened this issue Nov 6, 2018 · 13 comments
Labels

Comments

@glaucia86
Copy link

glaucia86 commented Nov 6, 2018

  • Node Version: v8.12.0
  • Npm: 6.4.1
  • Platform: Windows 10
  • Compiler: Visual C++ compiler
  • Module: node-usb | restify
Verbose output (from npm or node-gyp):
C:\Users\Glaucia Lemos\Downloads\Downloads\Backup - Comp Glaucia\Palestras\Apresentação - Semana da Mulher - ChatBot\semana-meninas-mulheres-ciencia>npm install

> dtrace-provider@0.8.7 install C:\Users\Glaucia Lemos\Downloads\Downloads\Backup - Comp Glaucia\Palestras\Apresentação - Semana da Mulher - ChatBot\semana-meninas-mulheres-ciencia\node_modules\dtrace-provider
> node-gyp rebuild || node suppress-error.js


C:\Users\Glaucia Lemos\Downloads\Downloads\Backup - Comp Glaucia\Palestras\Apresentação - Semana da Mulher - ChatBot\semana-meninas-mulheres-ciencia\node_modules\dtrace-provider>if not defined npm_config_node_gyp (node "C:\Users\Glaucia Lemos\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Glaucia Lemos\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Compilando os projetos desta solução um de cada vez. Para habilitar o build paralelo, adicione a opção "/m".
MSBUILD : Configuration error MSB4148: O nome de uma propriedade armazenada na chave do Registro "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" tem comprimento zero.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Glaucia Lemos\AppData\Roaming\npm\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:\\Users\\Glaucia Lemos\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Glaucia Lemos\Downloads\Downloads\Backup - Comp Glaucia\Palestras\Apresentação - Semana da Mulher - ChatBot\semana-meninas-mulheres-ciencia\node_modules\dtrace-provider
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
added 176 packages from 339 contributors and audited 372 packages in 8.55s
found 0 vulnerabilities

Hi guys! So... I've been while trying to execute node-gyp on my Windows 10. but without success. I've tried everything. Even the suggestion of the @refack here #1144. But no success.
I even install the VS 2015 and VS 2017 as you already said here on the documentation, but failed.

This is the message that appears in my screen:

MSB4148: The name of a property stored under the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" has zero length. 

I would like ask your help about it. Once I have been trying to install some packages use node-gyp and I can't continue to develop my projects.
Anyone here already resolve this issue?

screen shot 11-06-18 at 01 00 am

image

@glaucia86 glaucia86 changed the title I can't install node-gyp on Windows 10 w/ VS 2017 MSB4148: The name of a property stored under the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" has zero length Nov 6, 2018
@bzoz
Copy link
Contributor

bzoz commented Nov 6, 2018

@glaucia86
Copy link
Author

@bzoz I will try to make a uninstall here my VS 2017 and then I will return here if works! ;)

@glaucia86
Copy link
Author

Doesn't worked it! :(

image

@refack
Copy link
Contributor

refack commented Nov 6, 2018

AFAICT this looks like a bug in the MSVS install... So maybe also report this issue at https://github.com/Microsoft/msbuild

As a workaround you could try importing this regfile https://gist.github.com/refack/363ee65cb3a9a9c5f59f1977cdbf5fc8

@glaucia86
Copy link
Author

Nice.. I will try first remove the VS 2017 on my machine and then try to install node-gyp without VS 2017. If persists the issue, I will return here to send new updates about it.

p.s.: I will report them about it. Thanks a lot @refack it's a honor talk to you! :)

@glaucia86
Copy link
Author

glaucia86 commented Nov 6, 2018

@refack I uninstalled it everything on my machine here. I have done all the documentation procedures of the node-gyp and the error persists.

I've removed: VS 2017 and all subfolders. Everything.

image

Now I don't know what can be... :(

@refack
Copy link
Contributor

refack commented Nov 6, 2018

Well my first guess would be that it has something to do with your locale. You could try to search you registry for this value MSBuildRuntimeVersion for example. It might be in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\VersõesDeFerramentas ;)

@refack
Copy link
Contributor

refack commented Nov 6, 2018

Another thing you can try is to run node-gyp in a Developer Command Prompt for VS 2017 (cmd after running VsDevCmd.bat)

@glaucia86
Copy link
Author

I will try here again and then I will report you! Thanks a lot again! :)

@glaucia86
Copy link
Author

@refack I formatted my computer. I installed the node-gyp, but at the time of knowing the version of it appears this error:

image

@glaucia86
Copy link
Author

Going to close this issue once I formatted my computer and this error disappear.

@ErrorCode313
Copy link

I still have this issue, and I'm not willing to format my computer...

@cclauss cclauss added the Windows label Dec 9, 2021
@cclauss
Copy link
Contributor

cclauss commented Dec 9, 2021

Please provide the command that you typed and the full error log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants