Getting 404 for `script.js`
See original GitHub issueFirst 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.
After some quick search in the vercel org I came across this repository where I found a reference for this va/script.js
file.
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:
- Created a year ago
- Reactions:20
- Comments:48 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’re actively working on a solution for this issue. We’ll keep you posted!
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 🙌