skip to Main Content

When starting the project, reactstrap presents an error when importing the lib – Reactjs

Error console /node_modules/reactstrap/lib/index.js:1 import _Container from './Container'; ^^^^^^ SyntaxError: Cannot use import statement outside a module at internalCompileFunction (node:internal/vm:73:18) at wrapSafe (node:internal/modules/cjs/loader:1176:20) at Module._compile (node:internal/modules/cjs/loader:1218:27) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18)…

VIEW QUESTION

CORS ISSUE trying to send data to my server – Reactjs

"Access to XMLHttpRequest at 'http://localhost:3000/campgrounds/6411f03e718f68104cac045a' (redirected from 'http://localhost:5000/campgrounds') from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource." This is my code on…

VIEW QUESTION

get result of request – Reactjs

I have this: file accounts.controlles.ts import { requestT } from "src/service/request.api"; export const getaccounts = async () => { const response = await requestT({ method: "GET", url: "/accounts", }); return response; }; file header.tsx import { getaccounts } from "src/controllers/accounts.controller";…

VIEW QUESTION
Back To Top
Search