project works using if running using node index.js but throws error module not found when run through openlitespeed.

#1
First of all, I'd like to thank you for this amazing tool.

I have a Node.js + Express project that runs perfectly locally and even on a server when I run it through node index.js. However, it fails when OpenLiteSpeed tries to run it.

The module I'm specifying is definitely present at the location. I've even tried providing the full path, but it still doesn't work (while this same setup works when running through node index.js).

I'm not sure what further steps I should take. Any help would be greatly appreciated.
 

Attachments

maanu

New Member
#3
Hey, Thanks for the quick reply. It is working now. honestly I don't know exactly what fixed it, since I made a lot of configuration changes and project changes

it was working with default hello world example. That is why it was confusing.

Error [ERR_REQUIRE_ESM]: require() of ES Module. This was one of the errors I was receiving after making type: module in the package.json.

if I am able to get to bottom of the issue, I will post the solution here.

Thanks for your time.
 
Top