AnswerBun.com

Svelte dev server is stuck on old version

Stack Overflow Asked on January 3, 2022

I’m using Svelte with Rollup. I’ve always had a great dev server experience using npm run dev. Now, though the dev server seems stuck on an older version of my application. If I deploy with run build I get my latest changes, but npm run dev attempts to run the same thing from yesterday every time. I think this may be a browser session/cookie issue, as localhost:5000 in a chrome incognito tab served the latest version… but now it is also stuck on that version and won’t update as I make and save changes. Any tips?

2 Answers

Nothing on internet worked for me in this case, so I found following to (sort of) unblock myself

npm run build
npm run preview

This allows me to check the progress of my work.

Disadvantages of going this way:

  • Your changes are no longer live, you need to run these commands again in order to load any new changes.
  • It no longer retains the actual file structure. It has built your project for production, so it does some optimisations. As a result of which, it will be hard for you to debug the code in browsers.

Answered by Abhishek Kashyap on January 3, 2022

You probably need to disable the cache.

Open Dev Tools -> Network Tab -> Disable cache (top checkbox).

Answered by Carlos Roso on January 3, 2022

Add your own answers!

Related Questions

How to import util module in Node.js?

1  Asked on October 23, 2020 by lld

     

React.js search filtration on the array of objects

2  Asked on October 21, 2020 by ven-nilson

   

C# and the FileSystemWatcher

1  Asked on October 18, 2020 by thorsten-schroeer

       

C++ enum class with constructor

1  Asked on October 17, 2020 by cry0genic

   

Recharts ReferenceLine between data points

1  Asked on October 15, 2020 by philipp

   

Transform Issue With Bootstrap Card

3  Asked on October 15, 2020 by natalia-davydova

         

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP