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

Path issue when importing module #246

Closed
emlaver opened this issue Sep 19, 2019 · 3 comments
Closed

Path issue when importing module #246

emlaver opened this issue Sep 19, 2019 · 3 comments
Assignees

Comments

@emlaver
Copy link

emlaver commented Sep 19, 2019

When trying to import uuid in our nodejs code base, I get a Trace: Error: Cannot find module '/home/gradle/tests/uuid/v4' error.

After discussing with my team, we believe the issue has to with https://github.com/getgauge/gauge-js/blob/master/src/req-manager.js#L34.
It seems that an error will be thrown for anything where modname !== path.basename(modname), like uuid/v4 in our case.

We are using the workaround const uuidv4 = require('../node_modules/uuid/v4'); for the time being.

shubhamsc added a commit that referenced this issue Sep 24, 2019
@BugDiver
Copy link
Member

@emlaver Thanks for reporting the issue. We could replicate this at our end, and will try to fix it soon.

@gaugebot
Copy link

gaugebot bot commented Sep 25, 2019

The fix should be available in nightly >= 25-9-2019

@Debashis9012
Copy link
Contributor

This issue has been verified and found fixed.
Tested version: js (2.3.6.nightly-2019-10-01)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants