Highlighted
Respected Contributor.
Respected Contributor.
374 views

Truweb issue in using third party node modules

I tried Truweb script with third party node module to get some additional details.

Keep getting following error in require function.

 const perftestcustom= require('perftestcustom');

 [08:08:09.40] Error: Vuser [1]: "Require::RequireFunction - couldn't resolve path for the file os in folder: D:\TruWeb\Scripts\TruWeb1_test_nodemodules\node_modules\\perftestcustom\lib\" thrown at undefined:undefined:undefined

 [08:08:09.40] Error: Failed to create Vusers: the thread of vuser 1 didn't start correctly

 Used syntax provided in PC user guide.  I did install nodemodule using npm i \perftestcustom –save command.

https://admhelp.microfocus.com/truweb/en/latest/help/Content/TruWeb/TW-scripts.htm

Does anyone come across this error? Appreciatae your help. Thanks

0 Likes
2 Replies
Highlighted
Regular Contributor.
Regular Contributor.

Hello Senyam,

Thank you so much for submitting your concern,

Could you kindly let me know if you already installed Node.js?

Did you run the command npm i --save lodash?

Could you please try with the following line const lodash = require('lodash'); to see if you receive a different result?

Also, could you please upload your script?

Thank you in advance!

Have a great rest of your day!

Best regards.

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hello,

Could you please validate if third party node module 'perftestcustom' that you using, uses internally 'os' node module.

TruWeb supports requere pure JavaScript  modules.

 

Regards,

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.