spree_backend
spree_backend copied to clipboard
Could not resolve "@spree/dashboard" Yarn warning
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.
Hi @mrbrdo
Have you run yarn add @spree/dashboard
I did as the docs say:
bin/rails javascript:install:esbuild
# Install @spree/dashboard NPM package
bin/rails g spree:backend:install
@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