-
Notifications
You must be signed in to change notification settings - Fork 234
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
./node_modules/shpjs/lib/unzip.js Module not found: Can't resolve 'but-unzip' in '<myfolder>/node_modules/shpjs/lib' #217
Comments
so you've added |
Hm. I wish I could say more clearly what's happening when I run my site...I assume(?) create-react-app does some sort of magic which includes a compiling step, and it's at that step that I am getting this error. Fails to compile because it can't find the module in <..>/node_modules/shpjs/lib, which is appropriate, since I don't have the library there, but instead in in <..>/node_modules/but-unzip/... Which is my best guess was that something in @rollup/plugin-node-resolve wasn't acting the way I wanted |
the file dist/shp.esm.js is a compiled single file version of this library containing all it's dependencies appropriate to |
From some debugging my best theory right now is that the way we have create-react-app configured, it does not play nicely with dual-export libraries (which offer the esm/commonjs exports). I'm going to do the direct import of the file and most likely try to get off of CRA for the future. If anyone has gotten this library to successfully load into a CRA project, please comment, thanks |
I've switched from create-react-app to vite and have found it to be an improvement, create-react-app is fine until you have to do anything that strays from it's garden path even a little, and then it falls apart. |
I have a create-react-app application.
I tried to install this via
yarn add shpjs
It downloaded the files, and dependencies correctly.
It seems something is wrong with the module resolution though, when I try to run my code it won't compile and gives this error (where "myfolder" is a valid location). I do have but-unzip in my node_modules folder, it came with this package's dependencies.
./node_modules/shpjs/lib/unzip.js Module not found: Can't resolve 'but-unzip' in '<myfolder>/node_modules/shpjs/lib'
Appreciate any ideas on how to resolve this. Thanks!
The text was updated successfully, but these errors were encountered: