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
mathjs 7.5.1, installed 7.1.0 with npm and updated through package.json
in a node project with ES6 imports. I import mathjs like this: import math from 'mathjs';
So far I had no issues. evaluate() and parse() worked. Now I would like to use import for a custom function:
math.import({
myvalue2: 42
}
and get the error: TypeError: math.import is not a function
I think, but I am not sure that this is related to pull request #1941.
That is because I started learning node with this project and used ES6 from the beginning. It's still kind of a mystery to me what i.e. gulp or rollup does.
I tried several variations of import { all } from 'mathjs';
but that fails immediately with
import { all } from 'mathjs';
^^^
SyntaxError: The requested module 'mathjs' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export.
My question is, am I doing something wrong? Is there something I should do differently (preferrably without recompiling the source because I don't know how to do that)?
Thank you, rev111
The text was updated successfully, but these errors were encountered:
Hello,
I'm using
in a node project with ES6 imports. I import mathjs like this:
import math from 'mathjs';
So far I had no issues. evaluate() and parse() worked. Now I would like to use import for a custom function:
and get the error:
TypeError: math.import is not a function
I think, but I am not sure that this is related to pull request #1941.
That is because I started learning node with this project and used ES6 from the beginning. It's still kind of a mystery to me what i.e. gulp or rollup does.
I tried several variations of
import { all } from 'mathjs';
but that fails immediately with
My question is, am I doing something wrong? Is there something I should do differently (preferrably without recompiling the source because I don't know how to do that)?
Thank you, rev111
The text was updated successfully, but these errors were encountered: