Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jason Stoltzfus
    @JasonStoltz
    Ohhhh, that file writes to a .temp, temporary directory. I wonder if the . prefix is not allowed in windows.
    Or, possibly, the rimraf script is erroring in windows
    Constance
    @constancecchen
    No, rimraf is specifically cross-OS vs rm -rf
    so that one's fine
    I think it legit might just be changing ./bin/build-css to bin/build-css...?? it can't be that easy, can it?
    Jason Stoltzfus
    @JasonStoltz
    Can you try running those two commands directly in the windows terminal?
    Constance
    @constancecchen
    Haha yup, I'll test and sit here for the next 30 minutes while my shitty laptop chugs along
    Jason Stoltzfus
    @JasonStoltz
    Ugh, browserstack?
    Constance
    @constancecchen
    nah, just a super old windows machine I used to use
    Here's the full pastedump, by the way:
    > @elastic/react-search-ui-views@1.0.0 prepare C:\Users\Constance\Documents\master\search-ui\packages\react-search-ui-views
    > npm run build
    
    
    > @elastic/react-search-ui-views@1.0.0 build C:\Users\Constance\Documents\master\search-ui\packages\react-search-ui-views
    > run-s clean build-css build-js
    
    
    > @elastic/react-search-ui-views@1.0.0 clean C:\Users\Constance\Documents\master\search-ui\packages\react-search-ui-views
    > rimraf es lib
    
    
    > @elastic/react-search-ui-views@1.0.0 build-css C:\Users\Constance\Documents\master\search-ui\packages\react-search-ui-views
    > ./bin/build-css
    
    '.' is not recognized as an internal or external command,
    operable program or batch file.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @elastic/react-search-ui-views@1.0.0 build-css: `./bin/build-css`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @elastic/react-search-ui-views@1.0.0 build-css script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Constance\AppData\Roaming\npm-cache\_logs\2019-07-22T15_31_04_545Z-debug.log
    ERROR: "build-css" exited with 1.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @elastic/react-search-ui-views@1.0.0 build: `run-s clean build-css build-js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @elastic/react-search-ui-views@1.0.0 build script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Constance\AppData\Roaming\npm-cache\_logs\2019-07-22T15_31_04_750Z-debug.log
    lerna info lifecycle @elastic/react-search-ui-views@1.0.0~prepare: Failed to exec prepare script
    
    > @elastic/search-ui-app-search-connector@1.0.0 prepare C:\Users\Constance\Documents\master\search-ui\packages\search-ui-app-search-connector
    > npm run build
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! root@ postinstall: `cd packages && npm install && cd .. && lerna bootstrap`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the root@ postinstall script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Constance\AppData\Roaming\npm-cache\_logs\2019-07-22T15_31_05_135Z-debug.log
    PS C:\Users\Constance\Documents\master\search-ui>
    Constance
    @constancecchen
    Hopefully that helps provide a bit more context as to what's failing
    Jason Stoltzfus
    @JasonStoltz
    @constancecchen When I set this project up, I set it up to build js and css in the prepare lifecycle hook, which runs before publishing and after installing. I think we should use prepublishOnly, so they don't run after installing. I don't like that behavior, it doesn't make sense.
    Constance
    @constancecchen
    If it doesn't run after installing, won't sandbox look wonky though? if someone were to just install and then cd into sandbox and start that up
    or would we expect a developer to npm install and then npm run build/watch before cd examples/sandbox && npm run start
    (I assume build-css runs as part of npm run watch)
    also, that wouldn't fully solve the issue for windows users that need to develop, I think. they're still going to run into the ./bin issue
    Jason Stoltzfus
    @JasonStoltz
    True. I'm mainly concerned with people consuming these npm packages.
    Constance
    @constancecchen
    oh, gotcha - in that case, this issue wouldn't affect them, right? (I can test an npm package install if you want me to, just let me know)
    Jason Stoltzfus
    @JasonStoltz
    Oh I thought you said this did affect them? Like when you npm installed react-search-ui-views
    I may have misunderstood.
    Constance
    @constancecchen
    this is from a git clone - I'm npm installing in the repo root
    it's not from a published package installation
    Jason Stoltzfus
    @JasonStoltz
    Oh ok, I gotcha.
    I wonder if an npm install @elastic/react-search-ui-views would fail on windows?
    Constance
    @constancecchen
    Testing that now
    The published package installed without issue (likely because it's not building anything). So we're OK there. Looks like it's just developing locally that will cause issues for Windows
    Constance
    @constancecchen
    Although it also looks like Windows users these days have the option of installing the Windows Subsystem for Linux and developing in that environment (which I think the new Windows Terminal runs on?)
    Ah, I just noticed all our packages have bin/ unix executables. Hm, maybe we should just add a note to the README .for contributing/developing that windows users need to be in subsystem for linux.
    Jason Stoltzfus
    @JasonStoltz
    I think that's fair, for now
    Constance
    @constancecchen
    Another option would be to consider moving all our bin executables to a task runner like gulp or something, but we probably don't want to make a sweeping change like that for now I think
    selquest
    @selquest
    Hi folks, attempting to use search-ui with an on-premise AppSearch instance. Is the AppSearchAPIConnector capable of connecting to on-premise instances? The hostIdentifier documentation suggests it works when "developing against a local API server", but the string seems to just be inserted into the "api.swiftype.com..." url.
    this is my first experience with either AppSearch or search-ui, so I may be missing something stupid somewhere.
    selquest
    @selquest
    On digging further I found the endpointBase option that's passed through to the SwiftypeAppSearch client, so I'm up and running now
    Vadim Yakhin
    @yakhinvadim
    @selquest Glad you figured that out. I guess we should make this option more prominent in the docs.
    Jason Stoltzfus
    @JasonStoltz
    I agree, sorry for the confusion.
    Kaushik asp
    @_programmer0_twitter

    Hey, I'm working on a PR. I ran all the tests, of which some happened to fail.

    Instead of seeing a summary of how many tests passed/failed, I encounter this

    @elastic/react-search-ui-views: PASS src/__tests__/layouts/Layout.test.js
    @elastic/search-ui: npm ERR! code ELIFECYCLE
    @elastic/search-ui: npm ERR! errno 1
    @elastic/search-ui: npm ERR! @elastic/search-ui@1.0.0 test: `jest`
    @elastic/search-ui: npm ERR! Exit status 1
    @elastic/search-ui: npm ERR! 
    @elastic/search-ui: npm ERR! Failed at the @elastic/search-ui@1.0.0 test script.
    @elastic/search-ui: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    @elastic/react-search-ui-views: PASS src/__tests__/Sorting.test.js
    @elastic/search-ui: npm ERR! A complete log of this run can be found in:
    @elastic/search-ui: npm ERR!     /home/kaushikasp/.npm/_logs/2019-07-29T09_44_24_751Z-debug.log
    @elastic/react-search-ui-views: PASS src/__tests__/ResultsPerPage.test.js
    lerna ERR! npm run test exited 1 in '@elastic/search-ui'
    lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! root@ test: `lerna run test --stream --no-private`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the root@ test script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/kaushikasp/.npm/_logs/2019-07-29T09_44_24_811Z-debug.log
    Could you help me figure out If I'm missing something
    I ran npm run test from the project root
    Jason Stoltzfus
    @JasonStoltz
    @_programmer0_twitter cd into the packages/search-ui directory and run npm test from there
    Katy DeCorah
    @katydecorah_twitter
    Hey there! I was wondering if y'all had a list of supported browsers for search-ui?
    Vadim Yakhin
    @yakhinvadim
    Hey Katy! We support evergreen desktop browsers (Edge, Firefox, Opera, Chrome, Safari) and the latest Chrome for Android and iOS Safari.
    Kaushik asp
    @_programmer0_twitter
    @JasonStoltz Thanks, that worked ~!
    Grace Han
    @gh4n
    hey guys how would one go about connecting search ui to vanilla elasticsearch (not app search)
    Vadim Yakhin
    @yakhinvadim

    Hey Grace! We have recently added a section in our FAQ about that. You can read it here: https://github.com/elastic/search-ui/#how-do-i-use-this-with-elasticsearch
    Here's what it says now in case we change the link later:

    How do I use this with Elasticsearch?
    First off, we should mention that it is not recommended to make API calls directly to Elasticsearch from a browser, as noted in the elasticsearch-js client.
    The safest way to interact with Elasticsearch from a browser is to make all Elasticsearch queries server-side. Or you can use Elastic App Search, which can create public, scoped API credentials and be exposed directly to a browser.
    That being said, Search UI will still work with Elasticsearch (or any other API, for that matter). Read the Connectors and Handlers Guide to learn more, or check out the Elasticsearch Example.

    Andrey Masunov
    @masunovandrey
    Hi all, I've just started working with elastic/search-ui and faced trouble. On your demo every filter change leads to new search request. I have new component which allows to search in different indices, but I couldn't find solution how to trigger search soon after choosing index. (there is withSearch() method...but looks like something wrong...) Could you give me please a hint or any example of component which triggers search request? (I've looked at Clear filters button...but still...unclear)
    Jason Stoltzfus
    @JasonStoltz
    @masunovandrey I'm curious how your code is set up to use 2 indices, but I think your question is simple, you're just looking for a method of triggering a new search, correct?
    If you have a code example that would be helpful. Generally speaking, searches are triggered as a side effect of calling "actions" provided in components.
    Like in our ResultsPerPage component, it calls the setResultsPerPage action, which will update the search results: https://github.com/elastic/search-ui/blob/master/packages/react-search-ui/src/containers/ResultsPerPage.js#L37
    You could use either the withSearch Higher Order Component, or the WithSearch component to get access to these actions: https://github.com/elastic/search-ui/blob/master/ADVANCED.md#withsearch
    Jason Stoltzfus
    @JasonStoltz
    So you could, for instance, simply access the setSearchTerm action from the WithSearch component and call that to refresh the search results.