Working on a project for my internship, after a basic proof of concept I am now trying to get a nodeJS program that can call in functions from a .js file linked to a company intranet website and execute them.
I'm running into an issue with having nodeJS read the .js file/call in the proper functions while also ensuring that the front end/html still runs as intended. The .js file includes lines of jquery which nodeJS requires the use of something like
var $ = require('jquery');
in order for it to run. However, if I include this line (or, after some checking, ANY require('') statement, even if the variable assigned to the require is unused) in the .js, it causes some sort of break in the normal operations so that the front-end html site no longer displays/queries data properly.
Unfortunately I don't have a minimum code example to show so mainly looking to spitball ideas from anyone on if they've had similar problems. Possible solution would be to have a separate .js file with all the same functionality but re-written/adjusted to work for nodeJS, but we want to avoid that if possible