Skip to content

[FIX]: npx create-react-app my-app --template typescript Nested Folders Error #129

Closed
@mna-intend

Description

@mna-intend

I need many nested folders in folder, but i doesn't work properly. It gets me this error:
I am using Typescript.

ERROR
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `Pt`.
createFiberFromTypeAndProps@http://localhost:3003/static/js/bundle.js:89860:21
createFiberFromElement@http://localhost:3003/static/js/bundle.js:89881:46
createChild@http://localhost:3003/static/js/bundle.js:76953:54
reconcileChildrenArray@http://localhost:3003/static/js/bundle.js:77193:40
reconcileChildFibers@http://localhost:3003/static/js/bundle.js:77535:20
reconcileChildren@http://localhost:3003/static/js/bundle.js:81962:32
updateFunctionComponent@http://localhost:3003/static/js/bundle.js:82352:24
beginWork@http://localhost:3003/static/js/bundle.js:84046:20
callCallback@http://localhost:3003/static/js/bundle.js:69016:18
invokeGuardedCallbackDev@http://localhost:3003/static/js/bundle.js:69060:20
invokeGuardedCallback@http://localhost:3003/static/js/bundle.js:69117:35
beginWork$1@http://localhost:3003/static/js/bundle.js:89015:32
performUnitOfWork@http://localhost:3003/static/js/bundle.js:88263:16
workLoopSync@http://localhost:3003/static/js/bundle.js:88186:26
renderRootSync@http://localhost:3003/static/js/bundle.js:88159:11
performConcurrentWorkOnRoot@http://localhost:3003/static/js/bundle.js:87554:78
workLoop@http://localhost:3003/static/js/bundle.js:104186:46
flushWork@http://localhost:3003/static/js/bundle.js:104164:18
performWorkUntilDeadline@http://localhost:3003/static/js/bundle.js:104401:25
EventHandlerNonNull*./node_modules/scheduler/cjs/scheduler.development.js/<@http://localhost:3003/static/js/bundle.js:104437:7
./node_modules/scheduler/cjs/scheduler.development.js@http://localhost:3003/static/js/bundle.js:104487:5
options.factory@http://localhost:3003/static/js/bundle.js:640824:31
__webpack_require__@http://localhost:3003/static/js/bundle.js:640246:32
fn@http://localhost:3003/static/js/bundle.js:640483:21
./node_modules/scheduler/index.js@http://localhost:3003/static/js/bundle.js:104502:20
options.factory@http://localhost:3003/static/js/bundle.js:640824:31
__webpack_require__@http://localhost:3003/static/js/bundle.js:640246:32
fn@http://localhost:3003/static/js/bundle.js:640483:21
./node_modules/react-dom/cjs/react-dom.development.js/<@http://localhost:3003/static/js/bundle.js:65314:40
./node_modules/react-dom/cjs/react-dom.development.js@http://localhost:3003/static/js/bundle.js:91073:5
options.factory@http://localhost:3003/static/js/bundle.js:640824:31
__webpack_require__@http://localhost:3003/static/js/bundle.js:640246:32
fn@http://localhost:3003/static/js/bundle.js:640483:21
./node_modules/react-dom/index.js@http://localhost:3003/static/js/bundle.js:91144:20
options.factory@http://localhost:3003/static/js/bundle.js:640824:31
__webpack_require__@http://localhost:3003/static/js/bundle.js:640246:32
fn@http://localhost:3003/static/js/bundle.js:640483:21
./node_modules/react-dom/client.js@http://localhost:3003/static/js/bundle.js:91087:28
options.factory@http://localhost:3003/static/js/bundle.js:640824:31
__webpack_require__@http://localhost:3003/static/js/bundle.js:640246:32
fn@http://localhost:3003/static/js/bundle.js:640483:21
./src/index.tsx@http://localhost:3003/static/js/bundle.js:13586:93
options.factory@http://localhost:3003/static/js/bundle.js:640824:31
__webpack_require__@http://localhost:3003/static/js/bundle.js:640246:32
@http://localhost:3003/static/js/bundle.js:641403:56
@http://localhost:3003/static/js/bundle.js:641405:12
const test1: File =
  {
      isDirectory: true,
      name: "folder1",
      path: "/folder1",
      size: 0,
      updatedAt: "2025-01-07T08:42:48.333Z"
  };
formattedFiles.push(test1);

const test: File =
  {
      isDirectory: true,
      name: "folder2",
      path: "/folder1/folder2",
      size: 0,
      updatedAt: "2025-01-07T08:42:48.333Z"
  };
formattedFiles.push(test);

const test3: File =
  {
      isDirectory: false,
      name: "t.png",
      path: "/folder1/folder2/t.png",
      size: 0,
      updatedAt: "2025-01-07T08:42:48.333Z"
  };
formattedFiles.push(test3);

Metadata

Metadata

Assignees

Labels

invalidThis doesn't seem right

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions