You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use jsLPSolver locally in a browser, not running Node.js. I'm using the line from the 'in browser through CDN' section of the Install section of the README.
I tried the exact example in the "Use" section, but get the error Uncaught ReferenceError: require is not defined. It looks like the require.js library might offer a workaround for that, for those not using Node.js. But then I found an example without using require() from JWally. However when I run that in the script shown below, I get the error Uncaught ReferenceError: Solver is not defined in my console.
How can I resolve this? Feels like I'm missing something fundamental.
Yes, require is for node (or bundlers). You don't need it when using the CDN. When using the CDN, solver is a global so you don't have to require it. Try this:
I would like to use jsLPSolver locally in a browser, not running Node.js. I'm using the line from the 'in browser through CDN' section of the Install section of the README.
I tried the exact example in the "Use" section, but get the error
Uncaught ReferenceError: require is not defined
. It looks like the require.js library might offer a workaround for that, for those not using Node.js. But then I found an example without using require() from JWally. However when I run that in the script shown below, I get the errorUncaught ReferenceError: Solver is not defined
in my console.How can I resolve this? Feels like I'm missing something fundamental.
The text was updated successfully, but these errors were encountered: