0

Next.js build preview via Netlify GitHub integration is has numerous console errors rendering the site unusable:

webpack-211c438de79acdca.js:1 Uncaught SyntaxError: Unexpected token '<'
framework-715a76d8b0695da7.js:1 Uncaught SyntaxError: Unexpected token '<'
main-e0ddca6ca271803b.js:1 Uncaught SyntaxError: Unexpected token '<'
_app-029eabc97183f576.js:1 Uncaught SyntaxError: Unexpected token '<'
681-e3150cec4c2411ca.js:1 Uncaught SyntaxError: Unexpected token '<'
index-6ab295bf1b8cd412.js:1 Uncaught SyntaxError: Unexpected token '<'
_buildManifest.js:1 Uncaught SyntaxError: Unexpected token '<'
_ssgManifest.js:1 Uncaught SyntaxError: Unexpected token '<'
[Report Only] Refused to connect to 'https://cdn.segment.com/v1/projects/PzoD1qlC1wpvDGhNckresPQM3zcX8I1s/settings' because it violates the following Content Security Policy directive: "connect-src 'self' data: *.amazonaws.com *.bugsnag.com *.firebaseio.com *.giphy.com *.launchdarkly.com *.netlify.com *.segment.io netlify-cocoon.netlify.app netlify-slapp.netlify.app netlilink.netlify.app ws://localhost:3000 wss://*.services.netlify.com".

completely at a loss for how to go about debugging and solving this. Any help appreciated.

1 Answers1

0

If you have a _redirects file in your public folder, with the lines /* /index.html 200 then removing that should solve the problem. I also had this issue and posted a question. This answer solved it for me.

RamlahAziz
  • 47
  • 10