Skip to content
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

NoMethodError when running npm run publish:pact #64

Open
stlecho opened this issue Nov 27, 2024 · 0 comments
Open

NoMethodError when running npm run publish:pact #64

stlecho opened this issue Nov 27, 2024 · 0 comments

Comments

@stlecho
Copy link

stlecho commented Nov 27, 2024

When running npm run publish:pact I'm getting a NoMethodError

As documented, I've defined the following vars
export PACT_BROKER_BASE_URL="https://slecho.pactflow.io"
export PACT_BROKER_TOKEN="MyReadWriteToken"

I've also tried without the quotes and with PACT_BROKER_URL and PACT_API_TOKEN, but I'm getting the same result.

$ npm run publish:pact

> [email protected] publish:pact
> pact-broker publish ./pacts --consumer-app-version=$GITHUB_SHA --branch=$GITHUB_BRANCH --broker-base-url=$PACT_BROKER_BASE_URL --broker-token=$PACT_BROKER_TOKEN

[15:43:24.485] WARN (66216): [email protected]: DEPRECATION NOTICE: 
  pact standalone tools will be removed in pact-js-core 15.x.
  Please update imports to @pact-foundation/pact-cli
  https://github.com/pact-foundation/pact-js-core/issues/488
C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/hal/http_client.rb:49:in `create_request': undefined method `request_uri' for an instance of URI::Generic (NoMethodError)

          request = Net::HTTP.const_get(http_method).new(uri.request_uri)
                                                            ^^^^^^^^^^^^
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/hal/http_client.rb:25:in `get'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/hal/link.rb:41:in `get'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/hal/link.rb:45:in `get!'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/hal_client_methods.rb:24:in `index_resource'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/publish_pacts.rb:33:in `call'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/publish_pacts.rb:16:in `call'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/cli/pact_commands.rb:74:in `publish_pacts'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/cli/pact_commands.rb:33:in `publish'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/thor-1.3.1/lib/thor/command.rb:28:in `run'      
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/thor-1.3.1/lib/thor/invocation.rb:127:in `invoke_command'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/thor-1.3.1/lib/thor.rb:527:in `dispatch'        
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/thor-1.3.1/lib/thor/base.rb:584:in `start'      
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/vendor/ruby/3.3.0/gems/pact_broker-client-1.75.3/lib/pact_broker/client/cli/custom_thor.rb:34:in `start'
        from C:/projects/GitHub/pact-js-example/node_modules/@pact-foundation/pact-core/standalone/windows-x64-2.4.6/pact/lib/app/pact-broker.rb:34:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant