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.

[bug] get 404 not found ~partytown/debug/partytown-sandbox-sw.html with simple angular bundle html file and express server

See original GitHub issue

Describe 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.

To Reproduce Steps to reproduce the behavior: the partytown folder was copied by script, I just copy it again to this public folder.

  1. clone https://github.com/hiepxanh/partytown-example
  2. npm install then node server-html.js => should work fine, but node server-angular.js
  3. open incognito: first load work
  4. 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. image

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}`)
})

image

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:closed
  • Created a year ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nicksrandallcommented, Jun 6, 2022

I’m seeing this issue with React version as well.

There is no html 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

0reactions
adamdbradleycommented, Aug 8, 2022

Sorry but this issue seems related to Angular and copying files to the correct location, and not partytown itself. https://partytown.builder.io/angular

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 6 | Express : Getting 404 error on dist files
Main problem is that when your index.html for example tries to load <link rel="icon" type="image/x-icon" href="favicon.ico ...
Read more >
angular 404 (Not Found) :1234/app.component.html ... - GitHub
I set up a project with angular-cli that i added parcel to. with a basic setup and a basic two page routed setup...
Read more >
Bundle your Web application with ParcelJS - codeburst
it is the index.js file that the index.html file will load and index.js file will actually make use of every page will create....
Read more >
How to send REST response to html in Angular - GeeksforGeeks
In this article, we will see how to send API responses using HttpClient Module to an HTML using Angular, along with understanding the...
Read more >
Environment-Based Index HTML with Angular CLI
First, let's take a look at the straightforward way; if we examine the JSON input schema of the schematics browser builder, we see...
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