-
-
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
Uncaught TypeError: Failed to resolve module specifier "mathjs". Relative references must start with either "/", "./", or "../". #3201
Comments
I have also tried doing this:
, which returns this error in the browser's console:
|
How can we reproduce your issue? |
Hi Jos. I added the project's folder structure and how to reproduce the error in the main comment. |
After cracking my head for hours, the solution i've found was to use a module bundler (Vite) and to use the Jos, before closing the issue, i'd like to know if there was a way to use the library without resorting to a module bundler, because it bloats my project massively. The documentation also doesn't mention the necessity of using one. |
So I understand that you want to use the library as ES module and without any bundlers like discussed in #1928? You can use the browser bundle if you don't want to use a bundler, like |
Yes, correct. That was my intention. Thanks, i will use this solution next time i need to use the library. |
Hi.
I downloaded mathjs using npm, but i'm having trouble actually using it. I need to use the complex numbers tools that the libray provides in one of my project's modules (a js file), but merely trying to import mathjs (as the documentation shows):
import { complex } from "mathjs";
Is enough to give this error:
Uncaught TypeError: Failed to resolve module specifier "mathjs". Relative references must start with either "/", "./", or "../".
Everything else in my project is working just fine.
Project folder structure:
How to reproduce the error and observe it:
import { complex } from "mathjs
command;The text was updated successfully, but these errors were encountered: