-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Can't require() module in 6.0.0-alpha.8 #173
Comments
Thanks, I noticed this the other day also. Should be a simple one to fix, by converting to an absolute path and having a fallback. PR welcome ;) |
I'll take a look. The issue seems to stem from the relative path being different in the |
Thorn1089
added a commit
to Thorn1089/pact-js
that referenced
this issue
Apr 20, 2018
The package.json file appears at a different relative location in the source tree versus the compiled package. It should be resolved regardless of the level of nesting present in the calling module. Relates to pact-foundation#173
This is fixed now, closing. Thanks @TomRK1089 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Software versions
v8.9.4
Expected behaviour
I can run tests that import Pact like so:
Actual behaviour
I get an error when invoking the test via Mocha:
It looks like
@pact-foundation/pact/common/logger.js
is requiringpackage.json
from the wrong relative location:Manually editing this in my
node_modules
to ../package.json allows the test to pass. Were directories reorganized that might have led to the changed path?Steps to reproduce
Run
mocha spec test
with...test/mq-consumer.test.js:
The text was updated successfully, but these errors were encountered: