[bug] get 404 not found ~partytown/debug/partytown-sandbox-sw.html with simple angular bundle html file and express server
See original GitHub issueDescribe the bug Hi, nice to meet you. I see your team’s videos on twitter and it so amazing. The other framework tutorial is very good. But I want to try on html example to implement on my Angular app. I do it with basic html and express example but it just not work. and get error.
- the first load is fine
- the second load is error: partytown.js:42 GET http://localhost:3000/~partytown/debug/partytown-sandbox-sw.html?1653750131269 404 (Not Found)
To Reproduce Steps to reproduce the behavior: the partytown folder was copied by script, I just copy it again to this public folder.
- clone https://github.com/hiepxanh/partytown-example
npm install
thennode server-html.js
=> should work fine, butnode server-angular.js
- open incognito: first load work
- f5 to reload. See error
Reproduction link my stackblitz here but I have cors problem on stackbitz server https://stackblitz.com/github/hiepxanh/partytown-example?file=server.js
Expected behavior it should not error
Partytown version
What version of Partytown you are using, e.g. 0.0.6
Screenshots If applicable, add screenshots to help explain your problem.
const express = require('express')
var cors = require('cors')
var app = express()
app.use(cors())
const port = 3000
const myLogger = function (req, res, next) {
console.log('logger:', req.originalUrl)
next()
}
app.use(myLogger)
app.use(express.static('public'))
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
Additional context I read this but doesn’t help
https://partytown.builder.io/distribution#builderiopartytownlib
Also this issue doesn’t help too https://github.com/BuilderIO/partytown/issues/107
Issue Analytics
- State:
- Created a year ago
- Comments:12 (4 by maintainers)
Top GitHub Comments
I’m seeing this issue with React version as well.There is nohtml
in the lib folder and therefore it does not get copied over to my apps public folder to be served.Here are some docs I found that describe the issue: https://partytown.builder.io/distribution
Sorry but this issue seems related to Angular and copying files to the correct location, and not partytown itself. https://partytown.builder.io/angular