8000 Incorrect mimetype breaks build · Issue #489 · graphology/graphology · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Incorrect mimetype breaks build #489

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

Open
melindmi opened this issue Jul 31, 2023 · 7 comments
Open

Incorrect mimetype breaks build #489

melindmi opened this issue Jul 31, 2023 · 7 comments
Labels

Comments

@melindmi
Copy link

Hi,
When building an old project I get this error. It used to work well previously.
Anyone knows what the issue could be ?

Module not found: Error: Can't resolve 'obliterator/iterator' in '/path_to_modules/node_modules/graphology/dist'
Did you mean 'iterator.js'?
BREAKING CHANGE: The request 'obliterator/iterator' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

@Yomguithereal
Copy link
Member

Anyone knows what the issue could be ?

Yes, I tried to adapt so that ESM-first system can work out-of-the-box with graphology but because of the packaging schism it does not seem to work that well... Can you report what building tool you are using?

Fixing the graphology dependency to 0.25.0 or 0.25.1 should be a good workaround in your case for now.

@melindmi
Copy link
Author

I already use "graphology": "0.25.1" and I'm using "react-scripts": "^5.0.1". If I downgrade to "react-scripts": "^4.0.3" is working but I get other issues.

@Yomguithereal
Copy link
8000
Member

Do you have the same issue with 0.25.0? If so, the problem lies with react-scripts, which is known to do weird stuff wrt packaging and not graphology itself. Re-reading your error message it seems to be a configuration issue on the react-scripts end, namely regarding its choice of extension resolving and module type choice.

@melindmi
Copy link
Author

Same issue with 0.25.0 indeed.

@matedo1
Copy link
matedo1 commented Aug 1, 2023

Hi @Yomguithereal

We had the same issue on our project after graphology new releases were recently done, we also use "react-scripts": "5.0.1". I can confirm downgrading graphology from 0.25.3 to 0.25.1 as workaround solution fixed it for now.

Unfortunately we are not able to use latest graphology releases at this moment.

@melindmi
Copy link
Author
melindmi commented Aug 1, 2023

The workaround I found was to replace react-scripts to craco and add the configuration as described here: https://stackoverflow.com/questions/70964723/webpack-5-in-ceate-react-app-cant-resolve-not-fully-specified-routes/75109686#75109686

Yomguithereal added a commit that referenced this issue Aug 1, 2023
ESM-first support is not yet working
Related to #489
@Yomguithereal
Copy link
Member

I published v0.25.4 reverting back to v0.25.1 package semantics to avoid half-baked ESM-first support. This should fix most issues but we still don't have ESM-first support which is too much of a hassle currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
0