Closed Christoph-Raab closed 4 years ago
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 C:\testd
, instead of now it works.
Also I counted letters of the original path, it is more than 263.
I also figured, that I might have to enable longPaths
in the Admin Templates
of Computer Configuration
as mentioned here:
https://stackoverflow.com/questions/27680647/does-max-path-issue-still-exists-in-windows-10
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.
Any other ideas?
Use a Linux VM? Or Docker?
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.
Ok, thanks, that's bad.
Use a Linux VM? Or Docker?
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: https://github.com/pact-foundation/pact-node/issues/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'
[INFO]
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:inrequire' [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:inrequire' [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:inrequire' [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:inrequire' [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:inrun' [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:indispatch' [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] [2019-11-29T07:32:30.457Z] WARN: pact-node@10.2.2/19320 on xyz: Pact exited with code 1.