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

@uppy/dashboard does not provide an export named 'Dashboard' rails 7.1 #4747

Closed
2 tasks done
castafabio opened this issue Oct 19, 2023 · 3 comments
Closed
2 tasks done
Labels

Comments

@castafabio
Copy link

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

Create a new ruby 3.2.2. rails 7.1.1 project.
Importing Uppy with importmap with:
bin/importmap pin @uppy/core @uppy/drag-drop @uppy/dashboard --from jspm

in application.js
import { Uppy } from "@uppy/core";
import { Dashboard } from '@uppy/dashboard';

Expected behavior

Uppy dashboard to appear in page

Actual behavior

Got an error:
@uppy/dashboard does not provide an export named 'Dashboard'

@castafabio castafabio added the Bug label Oct 19, 2023
@Murderlon
Copy link
Member

Hi, it's the default export

- import { Dashboard } from '@uppy/dashboard';
+ import Dashboard from '@uppy/dashboard';

@Murderlon Murderlon closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2023
@castafabio
Copy link
Author

Thanks. it works.
Do you know how to import the css as well?
Now i got an error:
Failed to resolve module specifier "@uppy/core/dist/style.css". Relative references must start with either "/", "./", or "../".

when importing
import '@uppy/core/dist/style.css'
import '@uppy/dashboard/dist/style.css'

@Murderlon
Copy link
Member

You probably need a CSS loader for whatever Rails uses for JS, likely Webpack. This is quite specific to your setup so will be hard for me to help you there.

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

No branches or pull requests

2 participants