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.

Getting 404 for `script.js`

See original GitHub issue

First of all, great work with the updates. Watching the conference was really inspiring. Of course, my first thing to do was to update one of my Next.js projects and try the new goodies.

At one point I decided to try out this new Analytics feature called Audiences, but after adding it to the project I am getting these errors in the console. Screenshot 2022-10-25 at 23 46 55

After some quick search in the vercel org I came across this repository where I found a reference for this va/script.js file. Screenshot 2022-10-25 at 23 50 22

Overall, the audiences feature is working, I am getting visitor data in the newly enabled dashboard page; the issue only is that the browser logging this error.

If you need further details, example codes, let me know, but what i did was basically follow your guide:

  • install @vercel/analytics
  • import and place the Analytics react component into the _app.jsx file, like this:
import { Analytics } from '@vercel/analytics/react';

import '../styles/globals.css'

const MyApp = ({Component, pageProps }) => {
  return (
      <>
        <Component {...pageProps} />
        <Analytics />
      </>
  );
}

export default MyApp

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:20
  • Comments:48 (5 by maintainers)

github_iconTop GitHub Comments

26reactions
tobiaslinscommented, Oct 27, 2022

We’re actively working on a solution for this issue. We’ll keep you posted!

17reactions
tobiaslinscommented, Nov 2, 2022

Hey everyone! We just rolled out the fix for this issue. You will have to redeploy your apps to make it work.

Let us know how it goes 🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

JS files not found (404) - javascript - Stack Overflow
The files are located in the designated location and the code is at the bottom of the page so they shouldn't be getting...
Read more >
Why do I get 404 on javascript files that are present my ...
All the JavaScript includes in the index.html return 404 but all these files are present in the root directory of the app which...
Read more >
404 not found error for JavaScript files when accessing web ...
A 40-4 error means the file was not found so you are using the wrong path. I can't tell you the right one...
Read more >
Local Javascript file 404 error - Tumult Whisk
<script src="/Users/myname/Desktop/test.js"></script>. But it's failing to load, with a 404 (not found) error for the address:
Read more >
I keep getting this error, "Failed to load script.js:1 resource
I keep getting this error, "Failed to load script.js:1 resource: the server responded with a status of 404 (Not Found).".
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