Skip to content
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

@rollup/plugin-typescript TS2307: Cannot find module 'framework7/lite' #4055

Closed
kayazinc opened this issue Jun 26, 2022 · 2 comments · Fixed by #4060
Closed

@rollup/plugin-typescript TS2307: Cannot find module 'framework7/lite' #4055

kayazinc opened this issue Jun 26, 2022 · 2 comments · Fixed by #4060

Comments

@kayazinc
Copy link

kayazinc commented Jun 26, 2022

  • Framework7 version: 7.0.5
  • Svelte version: 7.0.5
  • Platform and Target: desktop, nodejs, chrome

Describe the bug

I cannot reproduce using CodeSandbox. tbh i have no idea what is wrong since i have issue trying to import Framework7 module:

import Framework7 from 'framework7/lite' <--- does not work
import Framework7 from 'framework7' <--- it works

Please advise me, thanks.

Below are the error messages:

[0] rollup-plugin-svelte: The following packages did not export their package.json file so we could not check the svelte field. If you had difficulties importing svelte components from a package, then please contact the author and ask them to export the package.json file.
[0] - framework7
[0] - framework7-svelte

Additional context

Add any other context about the problem here.

@AlwaysLoveme
Copy link
Contributor

AlwaysLoveme commented Jul 7, 2022

Hi, i fixed this error, just waiting for code to merge, or you can copy code to "typesVersions" of package.json in "node_modules/framework7" just for temporarily resolved;

{
...

"typesVersions": {
    "*": {
      ".": [
        "./framework7.d.ts"
      ],
      "components/appbar": ["./components/appbar/appbar.d.ts"],
      "components/dialog": ["./components/dialog/dialog.d.ts"],
      "components/popup": ["./components/popup/popup.d.ts"],
      "components/login-screen": ["./components/login-screen/login-screen.d.ts"],
      "components/popover": ["./components/popover/popover.d.ts"],
      "components/actions": ["./components/actions/actions.d.ts"],
      "components/sheet": ["./components/sheet/sheet.d.ts"],
      "components/toast": ["./components/toast/toast.d.ts"],
      "components/preloader": ["./components/preloader/preloader.d.ts"],
      "components/progressbar": ["./components/progressbar/progressbar.d.ts"],
      "components/sortable": ["./components/sortable/sortable.d.ts"],
      "components/swipeout": ["./components/swipeout/swipeout.d.ts"],
      "components/accordion": ["./components/accordion/accordion.d.ts"],
      "components/contacts-list": ["./components/contacts-list/contacts-list.d.ts"],
      "components/virtual-list": ["./components/virtual-list/virtual-list.d.ts"],
      "components/list-index": ["./components/list-index/list-index.d.ts"],
      "components/timeline": ["./components/timeline/timeline.d.ts"],
      "components/tabs": ["./components/tabs/tabs.d.ts"],
      "components/panel": ["./components/panel/panel.d.ts"],
      "components/card": ["./components/card/card.d.ts"],
      "components/chip": ["./components/chip/chip.d.ts"],
      "components/form": ["./components/form/form.d.ts"],
      "components/input": ["./components/input/input.d.ts"],
      "components/checkbox": ["./components/checkbox/checkbox.d.ts"],
      "components/radio": ["./components/radio/radio.d.ts"],
      "components/toggle": ["./components/toggle/toggle.d.ts"],
      "components/range": ["./components/range/range.d.ts"],
      "components/stepper": ["./components/stepper/stepper.d.ts"],
      "components/smart-select": ["./components/smart-select/smart-select.d.ts"],
      "components/grid": ["./components/grid/grid.d.ts"],
      "components/calendar": ["./components/calendar/calendar.d.ts"],
      "components/picker": ["./components/picker/picker.d.ts"],
      "components/infinite-scroll": ["./components/infinite-scroll/infinite-scroll.d.ts"],
      "components/pull-to-refresh": ["./components/pull-to-refresh/pull-to-refresh"],
      "components/lazy": ["./components/lazy/lazy.d.ts"],
      "components/data-table": ["./components/data-table/data-table.d.ts"],
      "components/fab": ["./components/fab/fab.d.ts"],
      "components/searchbar": ["./components/searchbar/searchbar.d.ts"],
      "components/messages": ["./components/messages/messages.d.ts"],
      "components/messagebar": ["./components/messagebar/messagebar.d.ts"],
      "components/swiper": ["./components/swiper/swiper.d.ts"],
      "components/photo-browser": ["./components/photo-browser/photo-browser.d.ts"],
      "components/notification": ["./components/notification/notification.d.ts"],
      "components/autocomplete": ["./components/autocomplete/autocomplete.d.ts"],
      "components/tooltip": ["./components/tooltip/tooltip.d.ts"],
      "components/skeleton": ["./components/skeleton/skeleton.d.ts"],
      "components/menu": ["./components/menu/menu.d.ts"],
      "components/color-picker": ["./components/color-picker/color-picker.d.ts"],
      "components/treeview": ["./components/treeview/treeview.d.ts"],
      "components/text-editor": ["./components/text-editor/text-editor.d.ts"],
      "components/elevation": ["./components/elevation/elevation.d.ts"],
      "components/typography": ["./components/typography/typography.d.ts"],
      "lite": ["./framework7.d.ts"],
      "types": [
        "./framework7-types.d.ts"
      ]
    }
  },
...
}

@yoyo930021
Copy link
Contributor

yoyo930021 commented Jul 8, 2022

The framework7/lite type is missing, but the component type isn't missing.
You must see this guide.
The component type will be correct.

Other type problem fixes in #4060.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants