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

The moduleSpecifier "../../libs/shim/urijs.js" couldn't be found on local disk. #49

Closed
CMathgician opened this issue Mar 15, 2022 · 9 comments · Fixed by #73
Closed
Assignees
Labels
bug Something isn't working

Comments

@CMathgician
Copy link

CMathgician commented Mar 15, 2022

image

Similar to this issue before: grafana/postman-to-k6#78
I changed the import "../../libs/shim/urijs.js"; on requests into import "../libs/shim/urijs.js";
and it runs well

@thim81
Copy link
Collaborator

thim81 commented Mar 15, 2022

hi @CMathgician

Could you provide me an example of which CLI parameters you are using?
And if possible the Postman collection JSON.

The issue should have been fixed a year ago and I want to be able to reproduce it.

@CMathgician
Copy link
Author

@thim81 Sorry, I can't share the collection.
But here is the command that I use:
npx @apideck/postman-to-k6 svc-sms/internal.json --separate true -o svc-sms/internal-script.js

and here the folder structure looks like after running that command:
image

Even on VSCode it's unable to resolve that ../../libs/shim/urijs.js path.
image

@thim81
Copy link
Collaborator

thim81 commented Mar 15, 2022

I think I see the issue.

Can you confirm or share if the requests in Postman or in a folder?
If they are not could, you try to put them in a folder and see if that solves the issue?

I use the "seperate" parameters but I think it is linked to requests not being in a folder, which results in an incorrect "import" path.

@CMathgician
Copy link
Author

CMathgician commented Mar 15, 2022

image

Should I add a folder? Or its already in a folder?
SMS Service Intenal --exported--> internal.json

@CMathgician
Copy link
Author

After I add a folder in postman and put the request there, and execute the same command. The structure changes like this Request/OTP
image

@thim81
Copy link
Collaborator

thim81 commented Mar 16, 2022

@CMathgician

Thanks for providing the info to reproduce the issue.
I'm going to reopen the issue and will try to fix it when I have some free time at hands.

The bug is linked to requests not being in folders, while the convertor was expecting it in a folder.

@thim81
Copy link
Collaborator

thim81 commented Aug 9, 2022

@CMathgician The relative path issue is resolved and it will be part of the upcoming postman-to-k6 release.

Thanks for taking the time to report the issue.

@CMathgician
Copy link
Author

Thank you @thim81

@thim81
Copy link
Collaborator

thim81 commented Aug 11, 2022

hi @CMathgician, The latest postman-to-k6 version (1.8.5) contains this enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants