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
"cannot load such file" error in pact-node-verifier on Windows #237
Comments
The first problem relates to an as-yet-undocumented issue relating to My guess is you're running into file length issues ( See if you can flatten the tree and if you still run into issues then we'll have to dig further. There is also a way you can update the registry to allow longer path lengths it seems. |
Yes, that was it, thanks. The Windows registry hack hasn't worked for me, though, so I had to move the project to a shallower path. |
:( I'm really sorry, but also, Windows ¯_(ツ)_/¯ |
yeah, people keep telling me that... ;) |
I had the same issue on macOS Catalina, the shallower path has helped me! Thanks @mefellows |
What! That doesn't sound right to me, and may be a symptom of another problem. But, ... glad it worked :P |
I have the same issue and the Windows registery hack does not work for me ... |
Try the v3 beta branch of Pact JS |
What does ‘npm ls @pact-foundation/pact-node’ give you? |
|
@AlexisLapeze: It's probably still path length. It looks like the registry edit suggested in the readme may not work depending on your version of windows. There is some discussion here: https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing If that doesn't work, try moving to a shallower path Also, sometimes the binary fails to download during |
Just ran into this May 13, 2022! |
The issue is with the version of Ruby that is used by the pact core- which, on windows, does not handle long paths correctly. The next version of Pact uses a different core, which isn't using Ruby, and won't have this problem. You may have some success with the beta release of pact-js - one of the maintainers may tell you what state it's in (I'm not up to date, as I'm not a pact maintainer any more) |
I'm trying to set up provider verification for a node express server.
This is the script I'm using to start the verification:
Once
verifyProvider()
is called, I get some output that Pact is connecting to my Pact Broker and then I get this error:The cause for this error is that the Ruby implementation of the
pact-provider-verifier
in mynode_modules
folder cannot load the filepact/provider_verifier/provider_states/remove_provider_states_header_middleware
in arequire
declaration (app.rb
line 3).However, I checked the file and it exists.
Any clues about this behavior?
The text was updated successfully, but these errors were encountered: