inveniosoftware / react-searchkit

React component library for interacting with a REST API.
https://inveniosoftware.github.io/react-searchkit/
MIT License
78 stars 40 forks source link

how to import { ReactSearchKit } from 'react-searchkit'; ? #148

Closed ksuess closed 3 years ago

ksuess commented 3 years ago

Package version: 1.0.0-alpha.7

Describe the bug

An import of ReactSearchKit fails

import { ReactSearchKit } from 'react-searchkit';

App is starting with yarn start but throws

Failed to compile
./src/addons/volto-facetednavigation/src/components/theme/FacetedNavigation.jsx
Attempted import error: 'ReactSearchKit' is not exported from 'react-searchkit'.

Additional context

The package volto-facetednavigation with dependency react-searchkit is an add-on of Volto.

/src
   /addons/volto-facetednavigation
   /package.json

package.json:

  "private": true,
  "workspaces": [
    "src/addons/volto-facetednavigation"
  ],
  "addons": [
    "@rohberg/volto-facetednavigation"
  ],
ksuess commented 3 years ago

I think the workspaces were mixed up. I reduced the dependencies of my add-on to

  "dependencies": {
    "react-searchkit": "1.0.0-alpha.8",
    "axios": "^0.19.2",
    "qs": "^6.8.0",
    "react-overridable": "^0.0.3"
  },
  "devDependencies": {
    "release-it": "*",
    "@babel/runtime": "^7.9.0"
  }