Skip to content
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

0.2.9 - failed to resolve dist/index.cjs.js #49

Closed
jschill opened this issue Dec 2, 2021 · 6 comments
Closed

0.2.9 - failed to resolve dist/index.cjs.js #49

jschill opened this issue Dec 2, 2021 · 6 comments

Comments

@jschill
Copy link

jschill commented Dec 2, 2021

My build is broken since a couple of days back with the following message from my bundler (FuseBox):

WARNING Statement "dist/index.cjs.js" has failed to resolve in module "@virtuoso.dev/react-urx"
WARNING Statement "dist/index.cjs.js" has failed to resolve in module "@virtuoso.dev/urx"

I guess it's because of the package.json changes introduced in 0.2.9. Looking in the dist folder there's no such file. However there is one named index.cjs. Is this expected?

@petyosi
Copy link
Collaborator

petyosi commented Dec 2, 2021

I don't know anything about FuseBox, I'm afraid. .cjs should be a valid extension for commonjs module? microbundle does it by default, and I had to move away from the previous bundling framework.

https://github.com/developit/microbundle

@jschill
Copy link
Author

jschill commented Dec 2, 2021

Yea it seems like fusbox can't handle that.

I'm surprised this was the first time the problem appeared - we have quite a few dependencies and those have its own dependencies etc. When looking in my node_modules there are no other .cjs-files while there are a few .cjs.js

@jschill
Copy link
Author

jschill commented Dec 2, 2021

If anyone else comes here in the same situation, I solved it by creating a postinstall script that copies the .cjs file to .cjs.js.

https://gist.github.com/jschill/6d79abaa12be3a5ca29368718bb7768f

@jschill jschill closed this as completed Dec 2, 2021
@petyosi
Copy link
Collaborator

petyosi commented Dec 3, 2021

Thank you. Out of curiosity - are you using urx as a standalone, or as part of the virtuoso library?

@jschill
Copy link
Author

jschill commented Dec 6, 2021

Thank you. Out of curiosity - are you using urx as a standalone, or as part of the virtuoso library?

Sorry for the late reply. As part of Virtuoso.

We've been jumping between state managment libs and are right now using two :-( of them. I guess redux observable was the closest one to urx.

@petyosi
Copy link
Collaborator

petyosi commented Dec 7, 2021

@jschill I reverted the build system back to tsdx. There's something wrong with the change:
petyosi/react-virtuoso#517 (comment)

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

No branches or pull requests

2 participants