getting error on server(aws) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON, but works fine on local - Laravel Application - laravel

I have deployed my laravel application on AWS server(ubuntu). Application works fine. But when I upload images using custom modal popup, then i got the syntax error from vendors.js.
Here is the error getting from modal popup while uploading images:
Can anyone tell about that, how i can resolve that?
I am just stuck from last two days.
I have tried run on server
npm i body-parser
And also re-add the file of vendors.js
But same result.

Related

Getting Hydration Failed errors in shopify when building the first app

I am learning how to code an Shopify app. I wanted to build first app and I started following this tutorial : https://shopify.dev/apps/getting-started/create
I used npm init #Shopify/app#latest to create first app, then moved to that directory using cd .\first-app\ then I used npm run dev App looks and works fine with UI but on console I am getting lots of errors. Here are few of them.
Hydration failed because the initial UI does not match what was rendered on the server.
There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.
vendors-node_modules_bugsnag_js_browser_notifier_js-node_modules_shopify_monorail_lib_monorai-fdaebc-b7c7bc61031d801d7cdf29f30133708999e0fe454a161247422ecc3e28c64ef8.js:2
Uncaught (in promise) Error: Error completing request. A network failure may have prevented the request from completing. Error: TypeError: Failed to fetch
And few more, I did set up the ngrok tunnel and it is working fine.
I might be missing something, any help or pointing me to right direction is appriciated
Trying to build my first app on Shopify going through their documentation using : https://shopify.dev/apps/getting-started/create

Cypress not opening URL and throwing error

I am trying to open a URL using cypress but it is giving error in response
{"error_code":"E0020000","trace_id":"c2ecd944c52b870ca9d4a014f821f4cd"}
Not sure what this error is.
I am using cy.visit("") to launch the URL. I tried this on different browsers but it is giving this error. Please help me with same

The stylesheet x was not loaded because its MIME type, “text/html”, is not “text/css”

I developed a MERN application where everything runs perfectly normal on localhost. Now I put my application live, Heroku for the backend and Netlify for the frontend, and when visting my home url (https://bap-nmd-2020-2021.netlify.app/) the page just stucks. Nothing is loaded and the code stops executing.
I used chrome and firefox dev edition to see what could be wrong. What I found where the following errors
In chrome dev tools:
Uncaught SyntaxError: Unexpected token '<'
In Firefox dev edition:
The stylesheet https://bap-nmd-2020-2021.netlify.app/static/css/main.ab94b624.chunk.css was not loaded because its MIME type, “text/html”, is not “text/css”.
Uncaught SyntaxError: expected expression, got '<'2.c23262ff.chunk.js:1
Uncaught SyntaxError: expected expression, got '<'main.361ee52b.chunk.js:1
As I said, everything runs smooth on localhost without any problems so my paths to imported files should be ok. So I am totally clueless about what could be the issue here.
I've already read through some threads here concerning this issue but I could not found the same exact problem. Most of the people have wrong paths included in there hrefs, which is not the the case here I think.
Somebody has any idea please?
Thanks in advance!

Uncaught SyntaxError: Unexpected token '<' in app.js in Gcloud

I'm very new to Gcloud after 4 attempts I deployed local Laravel + Vue Project to Gcloud. It worked fine in local env, but the app showing blank page after deployment and the console showing below error message.
Uncaught SyntaxError: Unexpected token '<' app.js.
Even the resource files also not visible.
App link: https://fluted-vehicle-277421.el.r.appspot.com/
Can anyone suggest what went wrong?
This error typically gets thrown when in js file you have put html.
Try checking if you have html inside js file and remove it.
Regarding the error you mentioned in your post, as you can see here, this error is most likely the result of a 404 page or a redirect to a page that serves regular html instead of the JavaScript files.
On the other hand, I am not sure if you deployed a new version but currently, the error I see if I go to your site is "There is no existing directory at "C:\xampp\htdocs\LMS_project\storage\logs" and its not buildable: Permission denie". So, as I can see these errors are because you are not change correctly the paths in your app. You need to ensure the right paths in order to avoid this errors.

Magento - Authentication Credentials Invalid

I am having an error trying to make a request:
Then when I submit I have the next error:
The 1003887036428 error report file:
Recently the system worked like a charm but it has to migrate to another host and this error started to appear in the actual hosting. I dont know why.

Resources