question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows 10 Long Pathing Issue

See original GitHub issue

We are running pact-node 6.19.6 karma-pact 2.1.5 and pact-web 5.9.1

Is there a max path length requirement? I seem to be having issues with running pact tests with directories that are long. After I change the length of the directory names, pact-node starts up successfully.

After running on windows machine with long path names:

Creating Pact Server with options:
    consumer = ux,
    provider = core,
    logLevel = debug,
    dir = C:\Users\aserie\source\repos\my-long-repo-name\long-workspace-name\apps\app1\pacts,
    log = C:\Users\aserie\source\repos\my-long-repo-name\long-workspace-name\apps\app1\logs\pact.log,
    port = 1234,
    host = localhost,
    pactFileWriteMode = overwrite,
    ssl = false,
    cors = false
[2018-07-16T14:34:57.615Z]  INFO: pact-node@6.19.6/10772 on aserie: Created 'standalone\win32-1.52.1\bin\pact-mock-service.bat service --consumer 'ux' --provider 'corerunner' --log-level 'DEBUG' --pact_dir 'C:\Users\aserie\source\repos\my-long-repo-name\long-workspace-name\apps\app1\pacts' --log 'C:\Users\aserie\source\repos\my-long-repo-name\long-workspace-name\apps\app1\logs\pact.log' --port '1234' --host 'localhost' --pact-file-write-mode 'overwrite'' process with PID: 6308
(node:10772) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
[2018-07-16T14:35:04.536Z]  WARN: pact-node@6.19.6/10772 on aserie: Pact exited with code 1.
[2018-07-16T14:35:04.536Z]  INFO: pact-node@6.19.6/10772 on aserie: Removing Pact with PID: 6308
ERROR: The process "6308" not found.                                                               

Simply making the directory smaller will start pact-node without it exiting with code 1. Shorter directory name: C:\Users\aserie\source\repos\my-repo\workspace\apps\app1.…

Similar whitespace Issue - #90

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mboudreaucommented, Jul 18, 2018

I’ve added a warning in Pact on initialization to let the user know if they have windows long path enable or not, version 6.19.7. It will warn the user about the issue and how to solve it by pointing them to a registry fix .

This is really the best I can do, the rest is on Windows to fix.

1reaction
mefellowscommented, Jul 18, 2018

I think this is perfect @mboudreau!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Destination path too long error in Windows 10 / 11
Solution 1] Enable Long Path Support using the Registry Editor · Solution 2] Rename the parent folder · Solution 3] Temporarily rename the...
Read more >
How to Make Windows 10 Accept File Paths Over 260 ...
To enable long file paths in Windows, open Registry Editor, create a new DWORD named "LongPathsEnabled" in ...
Read more >
Maximum Path Length Limitation - Win32 apps | Microsoft Learn
Starting in Windows 10, version 1607, MAX_PATH limitations have been removed from common Win32 file and directory functions. However, you must ...
Read more >
Destination Path Too Long Error When Moving/Copying a File
If you are facing the error Destination Path Too Long when trying to copy or move a file to a folder in Windows,...
Read more >
How to overcome the windows long path issue
The only 100% working suggestion is to reorganize and rename the files and folders to avoid having the long path issue at all....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found