我正在从两个文件夹创建 React Web 应用程序,应用程序内的动态路由返回这些错误。静态路由工作得很好。我收到错误: Uncaught SyntaxError: Unexpected token '<' manifest.json:1 Manifest: Line: 1, column: 1, Syntax error。
import React, { Component } from 'react';
import './NavBar.css';
import Axios from 'axios';
import { observer } from 'mobx-react';
import UserStore from '../../src/Stores/UserStore';
class NavBar extends Component {
constructor(props) {
super(props);
this.state = {
results: {},
apiLoading: false,
message: ''
};
}
async componentDidMount() {
try{ //check if the user is logged in
let res = await fetch('/isLoggedIn', {
method: 'post',
headers: { …Run Code Online (Sandbox Code Playgroud)