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

Could not resolve "@spree/dashboard" Yarn warning #210

Closed
mrbrdo opened this issue Nov 7, 2022 · 3 comments
Closed

Could not resolve "@spree/dashboard" Yarn warning #210

mrbrdo opened this issue Nov 7, 2022 · 3 comments

Comments

@mrbrdo
Copy link

mrbrdo commented Nov 7, 2022

I've started to get this warning (it says error but it's not fatal) upon starting bin/dev. I wasn't getting this initially (at least I think so), but it started showing up now. I believe the dashboard is external, if that is true, then should it be marked as such?

18:59:47 js.1   | yarn run v1.22.17
18:59:47 js.1   | $ esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets --watch
18:59:47 js.1   | ✘ [ERROR] Could not resolve "@spree/dashboard"
18:59:47 js.1   |
18:59:47 js.1   |     app/javascript/spree-dashboard.js:4:7:
18:59:47 js.1   |       4 │ import "@spree/dashboard"
18:59:47 js.1   |         ╵        ~~~~~~~~~~~~~~~~~~
18:59:47 js.1   |
18:59:47 js.1   |   You can mark the path "@spree/dashboard" as external to exclude it from the bundle, which will remove this error.
@MatthewKennedy
Copy link
Contributor

MatthewKennedy commented Nov 7, 2022

Hi @mrbrdo

Have you run yarn add @spree/dashboard

@mrbrdo
Copy link
Author

mrbrdo commented Nov 9, 2022

I did as the docs say:

bin/rails javascript:install:esbuild
# Install @spree/dashboard NPM package
bin/rails g spree:backend:install

@arvind4501
Copy link

@mrbrdo can you please provide more details to replicate the issue. it seems to be the issue with package dependency.
you can try this:-
yarn add @spree/dashboard
yarn build

also compile the assets rails assets:precompile

@mrbrdo mrbrdo closed this as completed Oct 9, 2024
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

No branches or pull requests

3 participants