-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Pact JS v12.1.0 can not be installed #1136
Comments
That is unexpected, as Pact-core contains the windows pre-build, you can see it in the code tab there They should be in
Yeah you shouldn't need vs studio compiler for installer, but may need it for other windows related devving. How come you are opening vs studio in the newly created folder, prior to doing npm init
|
Okay, thats weird, I tried it on two different PCs, and it didn't work without Visual Studio
I wanted to make sure, that it doesn't fail because of other dependencies or configurations in my project, so I created an empty folder as a test-project.
|
Details below - I do have vs installed on this machine, as I test lots of different languages and it was required for various things. npm:- 9.6.7 Edition Windows 11 Pro Are you suggesting that from your experience, it only works with visual studio installed? This is plausible, that vs is no longer needed for producing the binaries, but may be needed for something else in the installation process. I'll test in a vanilla VM pre and post installing vs, and confirm |
Not that I can see, although its making me wonder about the advise post the pre build. I think the tools may be required, as we rely on the ffi loading capabilities of node
However the linked package is no longer required to be installed via npm, it states at the top of the repo
|
Just taken a look at the log files. could you try with https://docs.npmjs.com/cli/v10/commands/npm-install#ignore-scripts in line 1042 of the log it is performing a node-gyp rebuild, which I wouldn't have expected. the ignore-scripts option should suppress that hopefully |
Yes, I had to do |
my pleasure, glad that sorted it for you |
Hi! Thanks again for your help, but currently I am a bit stuck on this issue. Even though it is possible to install the pact-js dependency using the --ignore-scripts option, this isn't a permanent solution for my project. The problem is, that I am working on an Repository together with multiple devs, and since the issue occured, everybody is forced to use the --ignore-scripts option when running npm install after any new added dependency. This may have several side-effects that I can't predict and that I don't want to risk since our project is running in production. I know there may be some work-arounds but I would like to ask if pact is planning on fixing this issue, so that we don't have to use the --ignore-scripts option. |
So it seems like for some reason it's not detecting the prebuilds exist. It's a bit tricky, because we can't reproduce the problem - if there was a way to replicate your environment/setup that would help, but perhaps another approach would be to create a github build and alter its environment somehow (e.g. removing binaries/system libs from the path). Another option, probably the easiest for you, is to fork |
Closing due to inactivity. |
Hi! I think I found a bug that occurs during the installation-process from pact-js v12.1.0
Software versions
Please provide at least OS and version of pact-js
Issue Checklist
Please confirm the following:
Expected behaviour
After typing the command npm i -S @pact-foundation/pact@latest, the dependency should be installed successfully.
Actual behaviour
The installaltion failed even though I installed Visual Studio to have an C++ Compiler (which shouldn't be necessary when using pact-js v12+). Without installing Visual Studio, the error logs say, that Visual Studio is missing, after installing Visual Studio the installation still fails with the error-message: "binding.gyp not found (cwd: C:\Users\john.doe\AppData\Local\Temp_pact\node_modules@pact-foundation\pact\node_modules@pact-foundation\pact-core) while trying to load binding.gyp"
Steps to reproduce
How can someone else reproduce this bug?
Like I already described, the installation process fails, if you Visual Studio installed or not, but the error message differs. For me it looks like, the prebuild binaries for C++ libraries are not shared like promised in the documentation and the binding.gyp file is missing, but I am not to shure what exactly is the problem. I would appreciate any help because I would like to use pact-js to write some contract-tests.
For formal reasons I created an Repository, but it has nothing in it except an empty package.json:
https://github.com/Jan429vv/pact-js-bug
Relevant log files
2023-11-10T11_25_27_534Z-debug-0.log
Thanks in advance!
The text was updated successfully, but these errors were encountered: