-
Notifications
You must be signed in to change notification settings - Fork 80
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 -- pact/mock_service/request_handlers/base_administration_request_handler #200
Comments
Can you try building the project in a shallower path? (this will help confirm that it is indeed the long path issue). |
I set up a project in Also I counted letters of the original path, it is more than 263. I also figured, that I might have to enable I did that, but it still doesn't work. Any other ideas? |
If it is indeed the 'too long path' issue, we don't have a fix at the moment I'm afraid. We are working on an alternative to the pact-ruby-standalone, however, we don't have an expected finish date yet. |
Use a Linux VM? Or Docker? |
Ok, thanks, that's bad.
I would have to set this up and everyone in my team. Bit much overhead just to use a dependency. But ok, than I guess I have to rethink and/or wait for the release of the new standalone |
In my case the path of the project under windows was just too long. To solv this i had to copy the project to a directory which wasnt that much nested as before (i.e. C:\myproject). |
Software versions
Expected behaviour
Contract tests run with jest
Actual behaviour
The project is setup like this:
https://github.com/pact-foundation/pact-js/tree/master/examples/jest
On running:
jest --runInBand --setupFiles ./pact/pactSetup.js --setupTestFrameworkScriptFile=./pact/pactTestWrapper.js
I get the error message (see detailed log below):
cannot load such file -- pact/mock_service/request_handlers/base_administration_request_handler (LoadError)
Afterwards the test suite fails because:
TypeError: Cannot read property 'writePact' of undefined
I am aware of this issue:
#100,
but enabling long path did nothing.
Steps to reproduce
I am running the build inside the https://github.com/eirslett/frontend-maven-plugin and call the npm run test commant like this:
This works in principle, since I can run other tests with jest with this command. For testing, all other tests are disabled, I only run the contract test.
When I delete the node_modules folder and run within wsl2:
npm install
npm run test
This works. It's only inside the frontend-maven-plugin.
Inside the frontend-maven-plugin runs the
npm install
command, which downloads the binaries for win32:When I browse to
pact/mock_service/request_handlers
inside node_module, there is abase_administration_request_handler.rb
fileAny ideas?
Detailed log
INFO: pact-node@10.2.2/19320 on xyz:
'[INFO] Creating Pact Server with options:
[INFO] {"consumer":"MyClient","cors":false,"dir":"...}
[INFO] ERROR: Process "15732" not found.
[INFO] [2019-11-29T07:32:30.393Z] ERROR: pact-node@10.2.2/19320 on en-pc-066:
[INFO] Pact Binary Error: D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/request_handlers/interaction_post.rb:1:in
require': cannot load such file -- pact/mock_service/request_handlers/base_administration_request_handler (LoadError) [INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/request_handlers/interaction_post.rb:1:in
<top (required)>'[INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/request_handlers.rb:1:in
require' [INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/request_handlers.rb:1:in
<top (required)>'[INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/app.rb:6:in
require' [INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/app.rb:6:in
<top (required)>'[INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/run.rb:2:in
require' [INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/run.rb:2:in
<top (required)>'[INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/cli.rb:33:in
require' [INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.2.0/lib/pact/mock_service/cli.rb:33:in
service'[INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/thor-0.20.3/lib/thor/command.rb:27:in
run' [INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
invoke_command'[INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/thor-0.20.3/lib/thor.rb:387:in
dispatch' [INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/vendor/ruby/2.2.0/gems/thor-0.20.3/lib/thor/base.rb:466:in
start'[INFO] from D:/projects/.../frontend/node_modules/@pact-foundation/pact-node/standalone/win32-1.72.2/lib/app/pact-mock-service.rb:15:in `
[INFO]
[INFO] [2019-11-29T07:32:30.457Z] WARN: pact-node@10.2.2/19320 on xyz: Pact exited with code 1.
The text was updated successfully, but these errors were encountered: