-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Mathjs 9.1.0 can't load crypto #2096
Comments
Thanks for reporting @OttawaIan . How can I reproduce this issue exactly? I do indeed still see a reference to Lines 84 to 86 in 5011ed1
It may be a matter of removing this dependency. |
I've cleaned up this reference to crypto, not yet published though. This may solve your issue. |
Awesome, is there anything I can do in the short term ? I even went back
and tried older versions 8.x and still had the same issue. It didn't
exist in 7.1.0 version of mathjs
I am on node v12.13.0.
Thanks for the quick response
Ian
…On Sat, Jan 30, 2021 at 4:40 AM Jos de Jong ***@***.***> wrote:
I've cleaned up this reference to crypto, not yet published though. This
may solve your issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2096 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACWQU253JV2MSKUP7LB6KDDS4PHZLANCNFSM4WZZJAYA>
.
|
What would help me is knowing how to reproduce your issue. So far it's only a guess from my side. |
I tried removing the crypto from your gulpfile.cjs, rebuilt the library and
ran my application with the new compiled version and that did the trick.
I removed the lines:
externals: [
'crypto' // is referenced by decimal.js
],
My application is pretty simple just a simple typescript web application
running with a controller.ts with
import * as mathjs from "mathjs/math";
class RootViewModel {
mathjsSqrt: ko.Observable;
constructor() {
this.mathjsSqrt = ko.observable(mathjs.sqrt(4));
}
}
export default new RootViewModel();
Simple index.html
<html lang="en-us">
<body class="web-applayout-body">
<p>Testing mathjs: It should display the square root of 4 (i.e., 2):
<oj-bind-text value="[[mathjsSqrt]]">
</oj-bind-text>
</p>
</body>
</html>
Ian
…On Sat, Jan 30, 2021 at 1:16 PM Jos de Jong ***@***.***> wrote:
Reopened #2096 <#2096>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2096 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACWQU2Y5QUY4ATZQSQXQYODS4REHLANCNFSM4WZZJAYA>
.
|
Awesome! Great to hear that this indeed fixes your issue 👍 |
The fix is now published in |
From looking around this issue was supposedly fixed awhile ago but I upgraded from 7.1.0 to 9.1.0 and I am having this issue in my typescript project. Does anyone know how to fix it ?? It seemed like bigdecimal fixed this in version
require.js:143 Uncaught Error: Script error for "crypto", needed by: mathjs/math
The example is a simple node project that displays an html page
import * as mathjs from "mathjs/math";
this.mathjsSqrt = ko.observable(mathjs.sqrt(4));
I am loading mathjs from mathjs/lib/browser folder
The text was updated successfully, but these errors were encountered: