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 created a stackmix project with serviceWorker features. After running
npm run dev
, I got this:I use
pnpm i
for installing dependencies.