Коллеги добрый день!
Помогите пожалуйста с формой регистрации на React выдает вот такую ошибку:
Compiled with problems:X
ERROR in ./src/register.js 7:0-62
Module not found: Error: You attempted to import ../../config/const which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
ERROR
[eslint]
src\register.js
Line 6:31: 'token' is not defined no-undef
Line 12:33: React Hook "useState" cannot be called at the top level. React Hooks must be called in a React function component or a custom React Hook function react-hooks/rules-of-hooks
Line 16:29: 'submitChackin' is not defined no-undef
Search for the keywords to learn more about each error.
В коде он ругается как я понял на эти строки
import React, {useState} from "react"
import axios from 'axios';
import validator from 'validator';
import { DOMEN_SERVER, DOMEN_SITE } from '../../config/const';
localStorage.setItem('token', token);