-
Notifications
You must be signed in to change notification settings - Fork 4
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
warn "export 'ElasticPressProvider' was not found in '@10up/elasticpress-react' #18
Comments
@sharmeela What version of the package are you using? Can you try with
I'll get the next version released as stable but in the meantime you can still from that |
Also if you're building a headless WordPress theme you might want to take a look at frontity and this other package: https://github.com/10up/frontity-packages/tree/develop/packages/elasticpress |
Hi Nicholasio, The npm command gives below error - Also I have taken branch with tag "https://github.com/10up/elasticpress-react/tags -> (tag 1.2.0)" which gives below error after i command "npm run start" and does not move ahead.
Watching source, compiling to dist: How do I start this on local to check the code? Regards, |
Sorry , wrong package name try this |
Hi @nicholasio , Thank you, |
@vishalkhialani it didn't work as in it didn't solve your problem or did it not install the package at all? If you're saying the command did not work and thus didn't install the package, can you try manually setting the package version in
There's also an example app in the Have you tried running the example app yourself and point to your own ep.io instance? Let me know if that helps! |
hi @nicholasio, Thanks for above fix. Finally it has started to run in my project. However Search is still not giving me any output. I have attached the screenshot for your reference of console for data. Also for record, We use Gatsby.js with React. To check the code, I have created repo and given public access, so you can check, This is the exact package.json we use for our product and you can have a look into it. https://github.com/sharmeela/testEllasticPress and below is the DEMO video - > ellasticpress_react_demo.mp4Following is my code for integration which runs successful api call but output provided as in screenshot with not as expected search result.
Kindly let me know, how to fetch search records on AutoSuggest or SearchField. |
Hey @sharmeela, can you confirm that your index has data? Have you indexed ElasticPress on your WordPress instance? I was looking at your source code and notice that you also don't need For Gatsby I assume you only need client-side search so you can just use the components directly without using fetching the results server side. |
If you set |
Hi@nicholasio , Thank you for the update and sorry for the late response. I have hosted the site for you to test which gives 2 rows of data after changing "loadInitialData={true}". But the search is not working as expected, typing something does not render any data. Please have a look into the video. https://nimb.ws/I6p4yr Also find screenshot of the endpoint which is giving data. Let me know what changes will help me get search result based on typing. |
@sharmeela Hi, Can you try going to the ElasticPress weighting dashboard on your WP instance and hitting save? EP.io requires an authenticated request to EP.io to tell EP.io which fields can be queriedd through the autosuggest endpoint. Saving in the weighting dashboard should force the EP plugin to make that request. |
Hi @nicholasio ,
Thankyou, |
@vishalkhialani Ah yeah, this package doesn't officially support querying/searching products yet. It's definitely something we do want to support. |
I have installed the elasticpress-react with following npm command - (https://github.com/10up/elasticpress-react)
npm install @10up/elasticpress-react --save
After installation, I am including code in my search page as - >
import {
AutosuggestField,
RelatedContent,
SearchField,
Posts,
ElasticPressProvider,
findResultsState,
} from '@10up/elasticpress-react'
<ElasticPressProvider
node="http://elasticpress.test/__elasticsearch"
indexName="elasticpresstest-post-1"
loadInitialData={false}
The error I found after compilation is as below -
warn "export 'ElasticPressProvider' was not found in '@10up/elasticpress-react'.
The file [ElasticPressProvider.js] is not in the above npm command build and I am not able to proceed since I need that wrapper.
The file is in elasticpress-react-develop\src\components\Provider\ElasticPressProvider.js location which is not bundled by "npm install @10up/elasticpress-react --save"
I have attached the screenshot of the content bundled by npm comment, Kindly let me know, how can I use this React+gastby code to work.
Regards,
Sharmeela
The text was updated successfully, but these errors were encountered: