-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
msbuild error MSB4025 #1144
Comments
VS 2017 isn't supported yet (see WIP in #1130) but if you install 2015 and pass |
Microsoft's chakracore engine is dependent on Windows SDK, and build tools should know the version installed on user machine. This change adds those dependencies in node-gyp tools. Below is the summary: * Configure msvs_windows_target_platform_version to use the right Windows SDK. * Configure msvs_use_library_dependency_inputs to export symbols correctly (otherwise functions not used by node.exe but might be needed by native addon modules could be optimized away by linker). These changes were originally made in nodejs/node#4765, but as @shigeki mentioned, it was more sensible to send these changes as PR to node-gyp repo. PR-URL: #873 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Except it uses the |
3.6.0 supports VS2017 This bug can be closed /cc @rvagg Editfor |
I'm still getting this error with |
@refack after installing VS 2017 C++ Build Tools as u mention side by side with VS2017 community edition. `> node-gyp rebuild C:\Users\himad\Desktop\testProject\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Users\himad\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) npm ERR! A complete log of this run can be found in: |
@himadrinath checking... |
@himadrinath try and set |
@refack after set GYP_MSVS_VERSION=2015 getting this one
npm ERR! A complete log of this run can be found in: |
Everything seems file... cd /d C:\Users\himad\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\
powershell.exe -ExecutionPolicy Unrestricted -Command "&{Add-Type -Path 'Find-VS2017.cs'; [VisualStudioConfiguration.Main]::Query(); }" You should see some JSON output similar to: {"log":"Found installation at: D:\\bin\\dev\\VS\\2017\\BuildTools\n - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64\n - Found Microsoft.VisualStudio.Component.Windows10SDK.14393\n - Found Microsoft.VisualStudio.VC.MSBuild.Base\n - Using this installation with Windows 10 SDK","path":"D:\\bin\\dev\\VS\\2017\\BuildTools","sdk":"10.0.14393.0"} Could you post it? |
`Exception calling "Query" with "0" argument(s): "Input string was not in a correct format."
|
Seems like you have a non "canonical" node-gyp. Do: cd /d C:\Users\himad\AppData\Roaming\npm\node_modules\npm
npm rm node-gyp
npm i node-gyp@3.6.0 --no-link |
`C:\Users\himad\AppData\Roaming\npm\node_modules\npm>npm rm node-gyp
C:\Users\himad\AppData\Roaming\npm\node_modules\npm>npm i node-gyp@3.6.0 --no-link |
That's it. Now try and |
@refack after following the process as you told. one of my other machine i just installed VS 2017 C++ Build Tools and test it. its work fine but still getting the same result into another machine where i just installed VS2017 Community `Exception calling "Query" with "0" argument(s): "Input string was not in a correct format."
|
This is quite strange since in the code that was distributed with There are a few thing we could try to solve this, and a few to try and figure out what's wrong:
To figure out:
powershell.exe -ExecutionPolicy Unrestricted -Command "if (Test-Path 'Registry::HKEY_CLASSES_ROOT\CLSID\{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}') { echo 'found' } else {echo 'not found'}" This should yield
|
Thanks.🤔🤔🤔 |
@refack but the problem is on............................ |
🤔🤔🤔🤔 Still thinking... |
@refack working on that........... |
Another helpful test would be for you to clone https://github.com/node4good/windows-autoconf Tools\try_powershell.cmd and paste the resulting JSON Tools\try_powershell.cmd > out.josn and upload |
`Add-Type : c:\Users\himad\AppData\Local\Temp\px25s2n1.0.cs(31) : The type or namespace name 'VSInstance' could not be
Add-Type : c:\Users\himad\AppData\Local\Temp\px25s2n1.0.cs(65) : The type or namespace name 'VSInstance' could not be
Add-Type : Cannot add type. Compilation errors occurred.
Unable to find type [VisualStudioConfiguration.Program].
` |
My bad, I'm using git sub-modules, you need to pull them as well
|
@refack how can i gave u team viewer credentials securely. so u can test your self |
@refack send |
@refack i don't know how to thank you. it's been more then 5 to 7 days i was trying to solve it. this is my first time in node and first package i installed. thank you is not enough........... |
Please Help me :( ;( |
@pavanIT1996 You need a later version of |
@richardlau after excute npm install fs-ext
|
The version of
It looks like |
@richardlau My package have versions have like this
|
Any Guide!!! :( ;( |
One of those dependencies is dependent on (or dependent on something else that is dependent on) an older version of
These lines indicate that |
So who really solved this problem and how? I've tried everything still this error. |
still same error.how to resolve |
@hengkx Check this comment |
Tried no effect |
I literally tested everything above , everything ! doesn't work and I had to uninstall node js and it's components completely, installed it again and now everything is working nice and smooth ! believe me I tried everything, that was the best solution for me |
I solved this error by running |
As @MadOPcode already pointed out, Windows 10, VS2017, Python2.7 installed. I performed all suggested actions, including uninstalling all the Windows for UWP, x64 and x86, etc. toolkits. Run of node-gyp configure --verbose in some directory:gyp info it worked if it ends with okgyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe', gyp verb cli '...\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js', gyp verb cli 'configure', gyp verb cli '--verbose' ] gyp info using node-gyp@3.8.0 gyp info using node@10.15.0 | win32 | x64 gyp verb command configure [] gyp verb check python checking for Python executable "python2" in the PATH gyp verb `which` failed Error: not found: python2 gyp verb `which` failed at getNotFoundError (...\npm\node_modules\node-gyp\node_modules\which\which.js:13:12) gyp verb `which` failed at F (...\npm\node_modules\node-gyp\node_modules\which\which.js:68:19) gyp verb `which` failed at E (...\npm\node_modules\node-gyp\node_modules\which\which.js:80:29) gyp verb `which` failed at ...\npm\node_modules\node-gyp\node_modules\which\which.js:89:16 gyp verb `which` failed at ...\npm\node_modules\node-gyp\node_modules\isexe\index.js:42:5 gyp verb `which` failed at ...\npm\node_modules\node-gyp\node_modules\isexe\windows.js:36:5 gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:154:21) gyp verb `which` failed python2 { Error: not found: python2 gyp verb `which` failed at getNotFoundError (...\npm\node_modules\node-gyp\node_modules\which\which.js:13:12) gyp verb `which` failed at F (...\npm\node_modules\node-gyp\node_modules\which\which.js:68:19) gyp verb `which` failed at E (...\npm\node_modules\node-gyp\node_modules\which\which.js:80:29) gyp verb `which` failed at ...\npm\node_modules\node-gyp\node_modules\which\which.js:89:16 gyp verb `which` failed at ...\npm\node_modules\node-gyp\node_modules\isexe\index.js:42:5 gyp verb `which` failed at ...\npm\node_modules\node-gyp\node_modules\isexe\windows.js:36:5 gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:154:21) gyp verb `which` failed stack: gyp verb `which` failed 'Error: not found: python2 at getNotFoundError (...\\npm\\node_modules\\node-gyp\\node_modules\\which\\which.js:13:12) at F (...\\npm\\node_modules\\node-gyp\\node_modules\\which\\which.js:68:19)\n at E (...\\npm\\node_modules\\node-gyp\\node_modules\\which\\which.js:80:29) at ...\\npm\\node_modules\\node-gyp\\node_modules\\which\\which.js:89:16 at ...\\npm\\node_modules\\node-gyp\\node_modules\\isexe\\index.js:42:5 at ...\\npm\\node_modules\\node-gyp\\node_modules\\isexe\\windows.js:36:5 at FSReqWrap.oncomplete (fs.js:154:21)', gyp verb `which` failed code: 'ENOENT' } gyp verb check python checking for Python executable "python" in the PATH gyp verb `which` succeeded python C:\Python27\python.EXE gyp verb check python version `C:\Python27\python.EXE -c "import sys; print "2.7.14 gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j gyp verb get node dir no --target version specified, falling back to host node version: 10.15.0 gyp verb command install [ '10.15.0' ] gyp verb install input version string "10.15.0" gyp verb install installing version: 10.15.0 gyp verb install --ensure was passed, so won't reinstall if already installed gyp verb install version is already installed, need to check "installVersion" gyp verb got "installVersion" 9 gyp verb needs "installVersion" 9 gyp verb install version is good gyp verb get node dir target node version installed: 10.15.0 gyp verb build dir attempting to create "build" dir: C:\WINDOWS\system32\build gyp verb build dir "build" dir needed to be created? C:\WINDOWS\system32\build gyp verb Not using VS2017: Could not use PowerShell to find VS2017 And goes on to complain that this directory actually is not a node project. |
I am also getting UPDATE: I get a different error when using 2015:
How is this problem still going on and why is it all of a sudden occurring when I've never had any trouble with this before? |
For my case, i just want to install bcrypt in angular 8 app, First, this is what the error I get: It say can't find python, then I try run this in administrator terminal:
Then i try install bcrypt, i get some header files missing: After google, i get my Windows 10 SDK via Visual Studio Installer Then i try again install bcrypt, get another error "MSBUILD : error MSB4025: The project file could not be loaded. Root element is missing", which lead me here: Finally, i run this command from #1144 (comment), it get me works:
|
node_modules\nan\nan.h(911) |
note that this should be run in PowerShell with Administrator Privileges |
This works like a charm! I was stubborn to keep on using |
https://www.npmjs.com/package/bcrypt is v4.0.1 |
I'm using
Windows 10
, node7.7.2
, npm4.1.2
I get this error when running
node-gyp rebuild
for after installing the binding moduleleveldown
(My objective is to rebuild it for electron). The specific error is...I searched for this error but it seemed to be specific to visual studio projects and xml files. I don't have a lot of context since I'm not usually a windows user. Somewhere I found that you can specific
--msvs_version=2013
, that did not work. But I tried with2017
(because that's the latest download) and I got the following error.If anyone has any idas I would be very grateful!
-S
The text was updated successfully, but these errors were encountered: