Nuxt: Encountered an unexpected < symbol

https://i.sstatic.net/MbM9f.png

I've been working on a nuxt project where I'm currently in the process of creating a map component using Google Maps with the help of the plugin https://www.npmjs.com/package/vue2-google-maps. After installing the plugin via npm, I started integrating it into my index.html page. The code snippet from my page looks like this:

<template>
   <div>

<br>
<br>
       <Card/>
<br>
<br>
<br>
<br>
       <!-- <Googlemap/> -->
       <Panel/>
       <Four/>
       </div> 
</template>

<script>

import Panel from '~/components/panel.vue'
import Card from '~/components/detailCard.vue'

export default {

  components: {

    Panel,
    Card

  }

}
</script>

However, when I tried to uncomment the lines related to Googlemap, I encountered an error as shown in the screenshot provided.

The Googlemap component code is as follows:

<template>
  <GmapMap
  :center="{lat:10, lng:10}"
  :zoom="7"
  map-type-id="terrain"
  style="width: 500px; height: 300px"
>
  <GmapMarker
    :key="index"
    v-for="(m, index) in markers"
    :position="m.position"
    :clickable="true"
    :draggable="true"
    @click="center=m.position"
  />
</GmapMap>

</template>


<script>
import Vue from "vue";
import * as VueGoogleMaps from "vue2-google-maps";

Vue.use(VueGoogleMaps, {
  load: {
    key: "MYTOKEN",
    libraries: "places"
  }
});

export default {

}

</script>


<style>

</style>

I'm currently stuck and unsure of what I might be doing wrong. Any guidance or suggestions would be greatly appreciated.

edit:

https://i.sstatic.net/EeLKF.png

Answer №2

Typically, this term pertains to the reaction received when a JSON object was anticipated in response to a request, but HTML is returned instead. The symbol < denotes the initial character in <!DOCTYPE or a similar element.

It's crucial to verify the responses received from the APIs or other services that are being utilized.

Answer №3

Switching from Node version 12x to Node version 14x did the trick for my project

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Utilizing Vue refs to set focus on a specific element target

Clicking on "span class="before-click" should hide it, and display input class="after-click" instead. The displayed input must be in focus! However, when trying to use $refs.afterClick to access the DOM and apply .focus(), an unexpected error stati ...

Encountered a complication during the compilation process using Laravel Mix and Vue framework

I have successfully integrated Laravel 8 with Vue Js in the past, but recently encountered an error when starting a new project with both frameworks. Here are the commands I used: Laravel v8.26.1 (PHP v7.4.3) composer create-project --prefer-dist laravel ...

Unforeseen behavior in event binding causing knockout knockout

I implemented an event binding for the scroll event on a DIV. To add debounce functionality to the handler, I created a function on my model that generates the debounced handler. Then, in my view, I bind this factory function. I assumed that my factory fu ...

The entry description function is not functioning properly when used with jGFeed

I have implemented jGFeed to extract data from an RSS Feed. Below is a snippet of the code I am using: $.jGFeed('http://feeds.bbci.co.uk/news/rss.xml', function(feeds){ // Check for errors if(!feeds){ ...

Error: Unable to access the 'https' property as it is undefined

My nuxt app, which is built with Firebase and Vue, encounters an error when running the emulator. The error message states: TypeError: Cannot Find Property 'https' of undefined. This issue seems to be related to the https property in my index.ts ...

Use ajax to add rows to the second-to-last table

I am facing a situation where I have a table with 25 default rows. When scrolling to the bottom of the table, I want to dynamically insert another set of 25 rows. Everything is functioning correctly, but in a specific scenario, I need to preserve the last ...

What is the best way to format a lengthy SQL query as a JavaScript variable?

I have a lengthy SQL query that needs to be converted into a JavaScript variable. The contact information is spread across separate rows using the + character. However, the SQLite plugin is displaying a parsing error: What is the correct way to format t ...

Can the mui dialog actions button be activated using CTRL + S?

Is it feasible to enable my users to save content in a MuI dialog by pressing CTRL + S? ...

Is there a way to retrieve and utilize this JSON data within Vue.js?

Here is the JSON output: { "Response": { "Error": { "ErrorCode": 0, "ErrorMessage": "" }, "Results": { "FareBreakdown": [{ ...

How can we send state updates directly to a conditionally rendered React component?

I am currently developing a React application with a tab section that displays specific components upon clicking on a tab. Initially, I have my parent component: class Interface extends Component { constructor(props) { super(props); ...

Vee Validate encountered a SyntaxError due to an invalid regular expression

I am utilizing VeeValidate along with regex to enforce password requirements, which include having at least two characters from the following categories: uppercase letters, lowercase letters, numbers, and symbols. v-validate="required|min:8|max:20|regex:/ ...

Tips on utilizing CSS modules in React without changing class names

After starting to use css modules in my react project, I quickly realized the struggle of changing classnames to fit the requirements of css modules. For example, if we have a component using regular css: import React from 'react' import ". ...

Is the presence of a potential leak suggested by this arrangement in the heap snapshot retainer hierarchy

While analyzing a Heap snapshot, I came across a retainer hierarchy that looks like this: https://i.sstatic.net/Zg3bJ.png Is it possible that the MuiThemeProviderOld element (highlighted in yellow and from the @material-ui/core library) is causing a memo ...

Executing a Node.js program using the command line without having to type out the word 'node'

I am currently working on a Node.js package that includes a command-line utility. Right now, alacon.js is situated in the root of the package. To execute this utility, I have to use the word node followed by the utility's name, like so: node alacon ...

Experiencing difficulty with setting up the ReactJS pagination component

Each time I click on a page number, the maximum size of the pages is returned as a handler parameter (for example, clicking on 2 returns 4). What could be causing this issue? UPDATE class PagingControl extends React.Component{ constructor(props) { ...

How can you determine if multiple checkboxes have been checked with "if" statements following a button click?

I am looking to display a message after clicking a button if one or more checkboxes are checked. I would prefer using Jquery for this functionality. Any help on achieving this would be highly appreciated. $(function() { $(".btn").click(function() { ...

Is there a way to display an image in a React Native app using data from a JSON file?

I am currently working with JSON content that includes the path of an image. I need to display this image in my React Native application. What is the best way to render this image? {"aImages":[{"obra_path":"http:\/\/uploa ...

Every time the page is refreshed, ExpressJS and NodeJS are working together to duplicate the array

var express = require("express"); var router = express.Router(); const fs = require("fs"); const path = require("path"); const readline = require('readline'); const directoryPath = path.resolve(__dirname,"../log ...

Utilize utility functions within the onCreated lifecycle event in Meteor

Here is my current setup: Template.myTemplate.helpers({ reactiveVar: new ReactiveVar }); How can I initialize reactiveVar within the onCreated function? Template.restaurantEdit.onCreated(function() { // I want to initialize helpers.reactiveVar here ...