roxiness / stackmix

A collection of templates for Routify.
22 stars 2 forks source link

serviceWorker broken? #28

Closed mzaini30 closed 3 years ago

mzaini30 commented 3 years ago

I created a stackmix project with serviceWorker features. After running npm run dev, I got this:

error when starting dev server:
Error: The following dependencies are imported but could not be resolved:

  workbox-window (imported by /home/zen/latihan/mainan/src/components/Serviceworker.svelte)

Are they installed?
    at optimizeDeps (/home/zen/latihan/mainan/node_modules/.pnpm/vite@2.4.1/node_modules/vite/dist/node/chunks/dep-cc49d7be.js:72342:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async runOptimize (/home/zen/latihan/mainan/node_modules/.pnpm/vite@2.4.1/node_modules/vite/dist/node/chunks/dep-cc49d7be.js:73001:48)
    at async Server.httpServer.listen (/home/zen/latihan/mainan/node_modules/.pnpm/vite@2.4.1/node_modules/vite/dist/node/chunks/dep-cc49d7be.js:73015:17)
npm ERR! code 1
npm ERR! path /home/zen/latihan/mainan
npm ERR! command failed
npm ERR! command sh -c vite

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zen/.npm/_logs/2021-07-09T17_56_51_342Z-debug.log
ERROR: "dev:vite" exited with 1.
npm ERR! code 1
npm ERR! path /home/zen/latihan/mainan
npm ERR! command failed
npm ERR! command sh -c run-p dev:*

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zen/.npm/_logs/2021-07-09T17_56_51_824Z-debug.log

I use pnpm i for installing dependencies.

barnadsv commented 3 years ago

Hi, @mzaini30 ! Juste use pnpm i -D workbox-window

mzaini30 commented 3 years ago

@barnadsv thanks