Closed ghost closed 6 years ago
I've just copied the index.js
file from the project folder into my projects lib folder and imported it from there. That works, but it's a pretty ugly, hacky solution. I'd appreciate feedback from you, because quite frankly I don't quite understand why importing it from node_modules
, as usual, won't work right away.
Hey @odiumediae, I wasn't able to reproduce the issue. Have you tried removing your node_modules folder and running npm install
again? What version on node are you running?
Yes, I have. I wouldn't waste anybody's time without at least trying the most obvious possibilities ;)
I've also updated all dependencies (including react-scripts
, which seems to report the error, but cannot really be the culprit here, at least I wouldn't know how) and I've tried different older versions of cosmicjs, but the problem persists as long as I don't import the module from within my own project.
It also makes no difference, whether I use import
or require
.
I'm running Node v9.11.1
, but before that I was still running v9.8.0
and it didn't work either.
@odiumediae can you please test with the latest version? I believe this issue is now fixed.
Just tested this and looks to be fixed. Thanks for the heads up @odiumediae!
I'm using cosmicjs in a big React app created with
create-react-app
and I cannot build the project vianpm run build
without receiving this error:Now as the helpful link suggest this means the file is not pre-compiled and that seems to be true, so could you please publish the next version precompiled (if that is indeed the issue here)?
Also, is there anything I can do as a workaround, so that I can import coscmisjs and build the app like I can with any other npm module now? The build happens via CI, so precompiling it manually makes the whole thing more brittle than it should anyway.
I'm open for suggestions. Maybe I'm just doing something wrong myself.