Cannot find module 'virtual:pwa-register' in vscode
See original GitHub issueHi, vscode is showing error ts2307 on the line import { registerSW } from 'virtual:pwa-register' which is near the top of my app.ts file. Everything compiles and works, but vscode is complaining. I’m wondering whether it’s a problem or something I missed?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Cannot find module 'virtual:pwa-register' in vscode #40 - GitHub
Hi, vscode is showing error ts2307 on the line import { registerSW } from 'virtual:pwa-register' which is near the top of my app.ts...
Read more >User and Workspace Settings - Visual Studio Code
When you open the Settings editor, you can search and discover the settings ... The error can be as simple as a missing...
Read more >Cannot find module '@vitejs/plugin-react' or its corresponding ...
Issue. I have created the project using npm create vite@latest and I choose ts-react, when I ran the script the. npm run dev...
Read more >PWA & Vite: Development of a Progressive Web App with Vue 3
PWA registration This component (ReloadPWA. vue) will show a button to update the application content if the Service Worker finds changes.
Read more >Could not find a declaration file for module ''react-materialize ...
You need to install the typings/types for the package (npm install @types/react-materialize). However, it looks like this doesn't exist yet, so ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@qgates
try adding entry on
typesontsconfig.jsonfile:"vite-pluginb-pwa/client"@userquin that works, thanks
0.6.5 doesn’t change anything specific to this issue, although it does stop vscode complaining about
Refif I open vite-plugin-pwa/client.d.ts (since I’m using vue2 in this project).So it appears the
typesapproach works in addition to options 3, 4 in my post above. Your approach is the cleanest so that’s probably the way to go. Many thanks.I created PR #42 to help others avoid this issue.