-
Notifications
You must be signed in to change notification settings - Fork 1
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
Is this in npm? #2
Comments
Hmm, I forked and built my own version (diff), commenting out /lib in .gitignore, and now getting this error. I know this isn't a broadly used library, but any quick tips on where to go could be helpful! I'm happy to contribute back fixes and improvements. |
I tried getting this working in my project a few different ways, but I'm not having any luck. This work attempts were done using my fork of react-redux-json-api, which upgrades to Babel 7, upgrades rollup, etc. My fork's branch with updates: getcommande#1 EnvironmentMy project is an Electron 11 project, so I'm probably importing using Node 12.8.3. I'm not well-versed on the history of amd, cjs, es, etc. but I think this means my environment would like dependencies such as this library to be built using cjs. However, my project uses ES6, webpack, and babel, so maybe there's a way I can use an 'es' packaged dependency as well. 🤷♂️ Here are the things I tried... Attempt 1: Import while using 'es' in rollupThe build for react-redux-json-api works fine, and my project's webpack build works fine, but then I get a runtime error I'm not sure what to do about. Attempt 2: Import while using 'cjs' in rollup**// in rollup.config.js
{ file: pkg.browser, format: 'cjs', exports: 'auto' },
// (exports was added because rollup told me to do so) The build for react-redux-json-api works fine, and my project's webpack build works fine, but then I get a runtime error when navigating to the component that uses Query from this package. I don't understand where in react-redux-json-api's code this error is coming from ( return (
<HotKeys handlers={HANDLERS} keyMap={hotkeysKeyMap.common} root="true">
<ErrorBoundary
placeholder={AppError}
>
<Provider store={store}>
<ConnectedRouter history={history}>
<Routes />
</ConnectedRouter>
</Provider>
</ErrorBoundary>
</HotKeys>
); Attempt 3: Import directly from /srcMy project uses JavaScript + Flow as well, so I tried importing Query directly from /src, i.e. |
Hi, I'm really liking the sister package to this (redux-json-api) and it's saving me from a ton of server-side and client-side boilerplate. Thank you for publishing that project. 🙏
I tried using this as well, putting this in my package.json
But the import is failing, I believe because getting this from a GitHub checkout leaves the "main": "lib/index.js", file un-built.
Did you ever consider putting this in npm like redux-json-api is?
What's the alternative? Some sort of after
yarn install
hook in my project's package.json that runs the build commands for react-redux-json-api? I think for some other dependencies I've forked the project just to commit the built files.Thanks again for making this project available. 🙏 🙏 🙏
The text was updated successfully, but these errors were encountered: