question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

deploy on express server

See original GitHub issue

Hi, can’t mange to make the plugins work with express as a server.

here is a test repo: https://github.com/unpseudocomplique/test-express-server

Steps to reproduce to NOT make it work:

yarn
yarn build
yarn start

Steps to reproduce to make it work:

Replace vite build by vite-ssg build and :

yarn
yarn build
yarn start

I have another question, why in the doc the plugin is installed in the devDependencies. If i push it to the server the building time will have a NODE_ENV=production so it will just crash when we import the package ? I tryed without thinking and yes obiviously it crashed (deployed on clever cloud).

Thanks for your help !

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
unpseudocompliquecommented, Oct 20, 2021

Found the issue with a big thanks to @userquin SW was not registered with autoUpdate. Here is a semple:

router.isReady().then(async () => {
    useRegisterSW({ immediate: true })
})
1reaction
unpseudocompliquecommented, Oct 20, 2021

I sended you an email with the app link to not make it public. As u can see app is over https, manifest loaded but i thinks the sw isn’t loaded.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Express Tutorial Part 7: Deploying to production
This tutorial provides some guidance on your options for choosing a hosting site, a brief overview of what you need to do in...
Read more >
Deploy a Node Express App - Render
You can deploy a Node Express application on Render in just a few clicks. A sample app for this quick start is deployed...
Read more >
3 services to deploy your Node.js app for free - LogRocket Blog
1. Qovery ... Qovery bills itself as “the simplest way to deploy your full-stack apps.” You will need to dockerize your Node.js app...
Read more >
How to deploy your app to the web using Express.js and Heroku
How to deploy your app to the web using Express.js and Heroku · 1. Create a new directory and initialise a Git repository...
Read more >
Build and deploy a Node.js Express app to Azure Cloud ...
Install Express · Install the Express generator by issuing the following command: · Change directories to the WebRole1 directory and use the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found