Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: can't correctly create custom component when importing external lib #1674

Open
clysss opened this issue Jun 16, 2024 · 11 comments
Open
Labels
bug Something isn't working

Comments

@clysss
Copy link

clysss commented Jun 16, 2024

Contact Details

No response

What happened?

I'm trying to create a custom component using jsonforms lib.
When I comment the jsonfoms call in the return (as in the sample code), everything goes fine and I see in log :
2024-06-16T21:37:56.342313743Z AdminJS watch
2024-06-16T21:37:56.372478350Z AdminJS is under localhost:8080/admin
2024-06-16T21:37:56.870898268Z Executing (default): SELECT 1+1 AS result
2024-06-16T21:37:57.117968255Z - Bundling files...
2024-06-16T21:37:57.441022456Z ✔ Finish bundling: 2 files
and when I uncomment it, the bundling never goes on and i've in interface : when i try to see the item :
Javascript Error
Error: Component "MyInput" has not been bundled, ensure it was added to your ComponentLoader instance (the one included in AdminJS options).
See development console for more details...

Bug prevalence

every time

AdminJS dependencies version

{
"name": "cy_42k_mvp",
"version": "1.0.0",
"main": "dist/server.js",
"author": "",
"license": "ISC",
"type": "module",
"scripts": {
"dev": "ts-node-dev --transpile-only --inspect --ignore-watch node_modules src/server.ts",
"build": "tsc",
"start": "node --loader ts-node/esm src/server.ts"
},
"dependencies": {
"@adminjs/express": "^6.1.0",
"@adminjs/sequelize": "^4.1.1",
"adminjs": "^7.8.1",
"bcrypt": "~5.0.1",
"chai": "^4.3.10",
"cors": "^2.8.5",
"dotenv": "^16.0.1",
"express": "^4.19.2",
"jsonwebtoken": ">=9.0.0",
"pg": "^8.11.5",
"sequelize": "^6.37.3",
"sequelize-cli": "^6.6.2",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.0",
"@jsonforms/core": "3.3.0",
"@jsonforms/material-renderers": "3.3.0",
"@jsonforms/react": "3.3.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/bcrypt": "~5.0.0",
"@types/chai": "^4.3.11",
"@types/cors": "^2.8.13",
"@types/express": "^4.17.21",
"@types/jsonwebtoken": "^9.0.1",
"@types/mocha": "^10.0.6",
"@types/node": "^20.14.2",
"@types/supertest": "^2.0.16",
"@types/swagger-jsdoc": "^6.0.4",
"@types/swagger-ui-express": "^4.1.6",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"chai": "^4.3.10",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-n": "^16.3.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-promise": "^6.1.1",
"mocha": "^10.2.0",
"prettier": "^3.1.0",
"supertest": "^6.3.3",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"typescript": "^5.4.5"
}
}

What browsers do you see the problem on?

Firefox

Relevant log output

2024-06-16T21:37:56.342313743Z AdminJS watch
2024-06-16T21:37:56.372478350Z AdminJS is under localhost:8080/admin
2024-06-16T21:37:56.870898268Z Executing (default): SELECT 1+1 AS result
2024-06-16T21:37:57.117968255Z - Bundling files...
2024-06-16T21:37:57.441022456Z ✔ Finish bundling: 2 files

Relevant code that's giving you issues

import { allowOverride, Edit, EditPropertyProps, ShowPropertyProps} from 'adminjs';
import { FormGroup, FormMessage, Label, RichTextEditor, TextArea, Input } from '@adminjs/design-system';
import React, { FC, useMemo, useState, ReactElement } from 'react';
import { JsonForms } from '@jsonforms/react';
import {  materialCells,  materialRenderers} from '@jsonforms/material-renderers';
const MyInputComponent:FC<EditPropertyProps> = (props): ReactElement => {
  const schema = {
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "title": "Long Description",
      "type": "string"
    }
  },
  "required": ["name"]
  }
  const uischema={
  "type": "VerticalLayout",
  "elements": [
    {
      "type": "Control",
      "scope": "#/properties/name"
    },
    {
      "type": "Control",
      "scope": "#/properties/description",
      "options": {
        "multi": true
      }
    }
  ]
}
       
const initialData = {}
const { property, record, onChange } = props

  const [data, setData] = useState(initialData);
  return (
    <div>
/*    <JsonForms
      schema={schema}
      uischema={uischema}
      data={data}
      renderers={materialRenderers}
      cells={materialCells}
      onChange={({ data }) => setData(data)}
      />*/
yyyyy</div>
  );
}
export default MyInputComponent
@clysss clysss added the bug Something isn't working label Jun 16, 2024
@dziraf
Copy link
Contributor

dziraf commented Jun 17, 2024

browser's console should display more detailed logs on what's wrong with jsonforms

@clysss
Copy link
Author

clysss commented Jun 17, 2024

Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools react-dom.development.js:29840:16
You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used. emotion-react.esm.js:440:14
i18next::backendConnector: No backend was added via i18next.use. Will not load resources. i18next.js:25:48
i18next: languageChanged en i18next.js:25:48
i18next: initialized
Object { debug: true, initImmediate: true, ns: (1) […], defaultNS: "translation", fallbackLng: (1) […], fallbackNS: (1) […], supportedLngs: (2) […], nonExplicitSupportedLngs: false, load: "currentOnly", preload: false, … }
i18next.js:25:48
i18next::translator: missingKey en translation labels.users Users i18next.js:25:48
i18next::translator: missingKey en translation labels.42k 42 K 2 i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items i18next.js:25:48
i18next::translator: missingKey en translation labels.users Users i18next.js:25:48
i18next::translator: missingKey en translation labels.42k 42 K 2 i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items i18next.js:25:48
i18next::translator: missingKey en translation labels.users Users i18next.js:25:48
i18next::translator: missingKey en translation labels.42k 42 K 2 i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items i18next.js:25:48
i18next::translator: missingKey en translation labels.users Users i18next.js:25:48
i18next::translator: missingKey en translation labels.42k 42 K 2 i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items 2 i18next.js:25:48
i18next::translator: missingKey en translation properties.id Id i18next.js:25:48
i18next::translator: missingKey en translation properties.updatedAt Updated At i18next.js:25:48
i18next::translator: missingKey en translation properties.createdAt Created At i18next.js:25:48
i18next::translator: missingKey en translation properties.manifest Manifest i18next.js:25:48
i18next::translator: missingKey en translation properties.publInfos Publ Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.publDatas Publ Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.editInfos Edit Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.editDatas Edit Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.schema Schema i18next.js:25:48
i18next::translator: missingKey en translation properties.parentId Parent Id i18next.js:25:48
i18next::translator: missingKey en translation labels.users Users i18next.js:25:48
i18next::translator: missingKey en translation labels.42k 42 K 2 i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items 2 i18next.js:25:48
i18next::translator: missingKey en translation properties.id Id i18next.js:25:48
i18next::translator: missingKey en translation properties.updatedAt Updated At i18next.js:25:48
i18next::translator: missingKey en translation properties.createdAt Created At i18next.js:25:48
i18next::translator: missingKey en translation properties.manifest Manifest i18next.js:25:48
i18next::translator: missingKey en translation properties.publInfos Publ Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.publDatas Publ Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.editInfos Edit Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.editDatas Edit Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.schema Schema i18next.js:25:48
i18next::translator: missingKey en translation properties.parentId Parent Id i18next.js:25:48
i18next::translator: missingKey en translation labels.users Users i18next.js:25:48
i18next::translator: missingKey en translation labels.42k 42 K 2 i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items 2 i18next.js:25:48
i18next::translator: missingKey en translation properties.id Id i18next.js:25:48
i18next::translator: missingKey en translation properties.updatedAt Updated At i18next.js:25:48
i18next::translator: missingKey en translation properties.createdAt Created At i18next.js:25:48
i18next::translator: missingKey en translation properties.manifest Manifest i18next.js:25:48
i18next::translator: missingKey en translation properties.publInfos Publ Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.publDatas Publ Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.editInfos Edit Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.editDatas Edit Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.schema Schema i18next.js:25:48
i18next::translator: missingKey en translation properties.parentId Parent Id i18next.js:25:48
i18next::translator: missingKey en translation properties.id Id i18next.js:25:48
i18next::translator: missingKey en translation properties.manifest Manifest i18next.js:25:48
i18next::translator: missingKey en translation properties.publInfos Publ Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.publDatas Publ Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.editInfos Edit Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.editDatas Edit Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.schema Schema i18next.js:25:48
i18next::translator: missingKey en translation properties.parentId Parent Id i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items i18next.js:25:48
i18next::translator: missingKey en translation properties.id Id i18next.js:25:48
i18next::translator: missingKey en translation properties.updatedAt Updated At i18next.js:25:48
i18next::translator: missingKey en translation properties.createdAt Created At i18next.js:25:48
i18next::translator: missingKey en translation properties.manifest Manifest i18next.js:25:48
i18next::translator: missingKey en translation properties.publInfos Publ Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.publDatas Publ Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.editInfos Edit Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.editDatas Edit Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.schema Schema i18next.js:25:48
i18next::translator: missingKey en translation properties.parentId Parent Id i18next.js:25:48
i18next::translator: missingKey en translation labels.users Users i18next.js:25:48
i18next::translator: missingKey en translation labels.42k 42 K 2 i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items i18next.js:25:48
i18next::translator: missingKey en translation labels.users Users i18next.js:25:48
i18next::translator: missingKey en translation labels.42k 42 K 2 i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items i18next.js:25:48
i18next::translator: missingKey en translation labels.users Users i18next.js:25:48
i18next::translator: missingKey en translation labels.42k 42 K 2 i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items 2 i18next.js:25:48
Uncaught Error: Component "MyInput" has not been bundled, ensure it was added to your ComponentLoader instance (the one included in AdminJS options).
Component base-property-component.js:77
React 11
workLoop scheduler.development.js:266
flushWork scheduler.development.js:239
performWorkUntilDeadline scheduler.development.js:533
task.js:62
run task.js:36
eventListener task.js:47
base-property-component.js:77:12
i18next::translator: missingKey en translation properties.publInfos Publ Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.publDatas Publ Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.editInfos Edit Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.editDatas Edit Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.schema Schema i18next.js:25:48
i18next::translator: missingKey en translation properties.parentId Parent Id i18next.js:25:48
i18next::translator: missingKey en translation labels.items Items i18next.js:25:48
Uncaught Error: Component "MyInput" has not been bundled, ensure it was added to your ComponentLoader instance (the one included in AdminJS options).
Component base-property-component.js:77
React 12
workLoop scheduler.development.js:266
flushWork scheduler.development.js:239
performWorkUntilDeadline scheduler.development.js:533
task.js:62
run task.js:36
eventListener task.js:47
base-property-component.js:77:12
i18next::translator: missingKey en translation properties.publInfos Publ Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.publDatas Publ Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.editInfos Edit Infos i18next.js:25:48
i18next::translator: missingKey en translation properties.editDatas Edit Datas i18next.js:25:48
i18next::translator: missingKey en translation properties.schema Schema i18next.js:25:48
i18next::translator: missingKey en translation properties.parentId Parent Id i18next.js:25:48
The above error occurred in one of your React components:

BasePropertyComponent/Component<@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:23698:15
section
O@https://xxx-ws.azurewebsites.net/admin/frontend/assets/design-system.bundle.js:19794:9
ErrorBoundary@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:11356:7
BasePropertyComponent@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:23681:9
section
O@https://xxx-ws.azurewebsites.net/admin/frontend/assets/design-system.bundle.js:19794:9
form
O@https://xxx-ws.azurewebsites.net/admin/frontend/assets/design-system.bundle.js:19794:9
Edit@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:23985:9
WrapperComponent
ErrorBoundary@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:11356:7
BaseActionComponent@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:24801:9
section
O@https://xxx-ws.azurewebsites.net/admin/frontend/assets/design-system.bundle.js:19794:9
Wrapper$1@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:28014:9
WrapperComponent
RecordAction@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:28026:41
WrapperComponent
RenderedRoute@https://xxx-ws.azurewebsites.net/admin/frontend/assets/global.bundle.js:57621:11
RenderedRoute@https://xxx-ws.azurewebsites.net/admin/frontend/assets/global.bundle.js:57621:11
Routes@https://xxx-ws.azurewebsites.net/admin/frontend/assets/global.bundle.js:58143:11
section
O@https://xxx-ws.azurewebsites.net/admin/frontend/assets/design-system.bundle.js:19794:9
section
O@https://xxx-ws.azurewebsites.net/admin/frontend/assets/design-system.bundle.js:19794:9
App@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:28501:53
WrapperComponent
Suspense
Router@https://xxx-ws.azurewebsites.net/admin/frontend/assets/global.bundle.js:58079:11
BrowserRouter@https://xxx-ws.azurewebsites.net/admin/frontend/assets/global.bundle.js:58794:11
I18nextProvider@https://xxx-ws.azurewebsites.net/admin/frontend/assets/app.bundle.js:854:16
Le@https://xxx-ws.azurewebsites.net/admin/frontend/assets/design-system.bundle.js:19714:18
Provider$1@https://xxx-ws.azurewebsites.net/admin/frontend/assets/global.bundle.js:52326:22

React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary. react-dom.development.js:18687:14

@clysss
Copy link
Author

clysss commented Jun 17, 2024

(for easier reading : )
Uncaught Error: Component "MyInput" has not been bundled, ensure it was added to your ComponentLoader instance (the one included in AdminJS options).
Component base-property-component.js:77
React 11
renderWithHooks
mountIndeterminateComponent
beginWork
callCallback
invokeGuardedCallbackDev
invokeGuardedCallback
beginWork$1
performUnitOfWork
workLoopSync
renderRootSync
performConcurrentWorkOnRoot
workLoop scheduler.development.js:266
flushWork scheduler.development.js:239
performWorkUntilDeadline scheduler.development.js:533
task.js:62
run task.js:36
eventListener task.js:47
base-property-component.js:77:12

@clysss
Copy link
Author

clysss commented Jun 17, 2024

tsconfig :
{
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"jsx": "react",
"outDir": "dist",
"typeRoots": ["node_modules/@types", "./types"]
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}

@dziraf
Copy link
Contributor

dziraf commented Jun 18, 2024

If I were to guess, I'd say it might be an issue with Material UI renderers since AdminJS doesn't use MUI.

The error basically says that the component hasn't been built

@clysss
Copy link
Author

clysss commented Jun 18, 2024 via email

@clysss
Copy link
Author

clysss commented Jun 18, 2024 via email

@clysss
Copy link
Author

clysss commented Jun 18, 2024

With button mui it works :
It needs around 2 minutes to build the 971 files but after the component is
correctly rendered.

Is there a way to start manually the bundling that I can see what's wrong? because
when I 'm very very patient, the bundling with jsonforms finish by crashing :

2024-06-18T20:34:39.0410673Z Connection...
2024-06-18T20:34:39.0743635Z AdminJS watch
2024-06-18T20:34:39.1041674Z AdminJS is under localhost:8080/admin
2024-06-18T20:34:39.5351664Z Executing (default): SELECT 1+1 AS result
2024-06-18T20:35:22.6320749Z authenticate
2024-06-18T20:35:23.0667098Z Executing (default): SELECT "id", "name", "email", "password", "role", "createdAt", "updatedAt" FROM "users" AS "users" WHERE "users"."email" = '[email protected]';
2024-06-18T20:37:21 No new trace in the past 1 min(s).
2024-06-18T20:38:21 No new trace in the past 2 min(s).
2024-06-18T20:39:21 No new trace in the past 3 min(s).
2024-06-18T20:40:05.4095816Z [BABEL] Note: The code generator has deoptimised the styling of /node_modules/@mui/icons-material/index.js as it exceeds the max of 500KB.
2024-06-18T20:40:12.4124629Z Executing (default): SELECT "id", "parentId", "schema", "editDatas", "editInfos", "publDatas", "publInfos", "manifest", "createdAt", "updatedAt" FROM "items" AS "items" ORDER BY "items"."id" ASC LIMIT 10 OFFSET 0;
2024-06-18T20:40:12.6716171Z Executing (default): SELECT count() AS "count" FROM "items" AS "items";
2024-06-18T20:41:21 No new trace in the past 1 min(s).
2024-06-18T20:42:21 No new trace in the past 2 min(s).
2024-06-18T20:42:54.5955316Z - Bundling files...
2024-06-18T20:44:21 No new trace in the past 1 min(s).
2024-06-18T20:45:09.1131382Z
2024-06-18T20:45:09.1132389Z <--- Last few GCs --->
2024-06-18T20:45:09.1132434Z
2024-06-18T20:45:09.1132482Z [101:0x7220d50] 642593 ms: Scavenge 1997.9 (2076.2) -> 1990.1 (2080.0) MB, 23.86 / 0.03 ms (average mu = 0.266, current mu = 0.174) allocation failure;
2024-06-18T20:45:09.1132522Z [101:0x7220d50] 642852 ms: Scavenge 2001.6 (2080.0) -> 1993.7 (2082.0) MB, 55.40 / 0.07 ms (average mu = 0.266, current mu = 0.174) task;
2024-06-18T20:45:09.1132566Z [101:0x7220d50] 646650 ms: Mark-Compact 2004.4 (2082.2) -> 1985.1 (2082.5) MB, 3567.32 / 0.14 ms (average mu = 0.275, current mu = 0.284) task; scavenge might not succeed
2024-06-18T20:45:09.1132596Z
2024-06-18T20:45:09.1132627Z
2024-06-18T20:45:09.1132687Z <--- JS stacktrace --->
2024-06-18T20:45:09.1132721Z
2024-06-18T20:45:09.1132761Z FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
2024-06-18T20:45:09.1132794Z ----- Native stack trace -----
2024-06-18T20:45:09.1132824Z
2024-06-18T20:45:09.1138360Z 1: 0xca5580 node::Abort() [node]
2024-06-18T20:45:09.1143718Z 2: 0xb781f9 [node]
2024-06-18T20:45:09.1150032Z 3: 0xeca4d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate
, char const*, v8::OOMDetails const&) [node]
2024-06-18T20:45:09.1156247Z 4: 0xeca7b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
2024-06-18T20:45:09.1163314Z 5: 0x10dc505 [node]
2024-06-18T20:45:09.1272439Z 6: 0x10dca94 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
2024-06-18T20:45:09.1272783Z 7: 0x10f3984 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [node]
2024-06-18T20:45:09.1272835Z 8: 0x10f419c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
2024-06-18T20:45:09.1272873Z 9: 0x114cf5c v8::internal::MinorGCJob::Task::RunInternal() [node]
2024-06-18T20:45:09.1272951Z 10: 0xd20366 [node]
2024-06-18T20:45:09.1381883Z 11: 0xd22f1f node::PerIsolatePlatformData::FlushForegroundTasksInternal() [node]
2024-06-18T20:45:09.1382246Z 12: 0x188ae53 [node]
2024-06-18T20:45:09.1382286Z 13: 0x189f8cb [node]
2024-06-18T20:45:09.1382321Z 14: 0x188bb77 uv_run [node]
2024-06-18T20:45:09.1382358Z 15: 0xbbbb83 node::SpinEventLoopInternal(node::Environment*) [node]
2024-06-18T20:45:09.1455932Z 16: 0xcf4ee5 [node]
2024-06-18T20:45:09.1456378Z 17: 0xcf58ad node::NodeMainInstance::Run() [node]
2024-06-18T20:45:09.1456460Z 18: 0xc5f397 node::Start(int, char**) [node]
2024-06-18T20:45:09.1456498Z 19: 0x7d542313b24a [/lib/x86_64-linux-gnu/libc.so.6]
2024-06-18T20:45:09.1456535Z 20: 0x7d542313b305 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
2024-06-18T20:45:09.1456571Z 21: 0xbb8eee _start [node]
2024-06-18T20:45:53.8265594Z Aborted (core dumped)
2024-06-18T20:45:53.9454608Z npm notice
2024-06-18T20:45:53.9455280Z npm notice New minor version of npm available! 10.5.0 -> 10.8.1
2024-06-18T20:45:53.9455330Z npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
2024-06-18T20:45:53.9455503Z npm notice Run npm install -g [email protected] to update!
2024-06-18T20:45:53.9455545Z npm notice
2024-06-18T20:45:54.0587213Z Container has finished running with exit code: 134.
2024-06-18T20:45:54.0592608Z Container is terminating. Grace period: 5 seconds.
2024-06-18T20:45:54.0691379Z Stop and delete container. Retry count = 0
2024-06-18T20:45:54.0691952Z Stopping container: 42kvendors-ws_1589815b.
2024-06-18T20:45:54.1007131Z Deleting container: 42kvendors-ws_1589815b. Retry count = 0
2024-06-18T20:45:54.4692657Z Container spec TerminationMessagePolicy path
2024-06-18T20:45:54.4724307Z Container is terminated. Total time elapsed: 405 ms.

@dziraf
Copy link
Contributor

dziraf commented Jun 19, 2024

Try running the app with:
https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes

Set it to at least 4096 and see if it helps. It looks like JSONForms or MUI exports lots of files which are bundled and the app runs out of memory during bundling. You can research if you can import files from their libraries so that tree shaking works

@clysss
Copy link
Author

clysss commented Jun 19, 2024

still the same bug... even it's after a longer time !

@clysss
Copy link
Author

clysss commented Jun 19, 2024

update : after upgrading from 7 to 16go the server and give 12go to stack, it finaly works...
and wait for 18 minutes to start !!
I'll ask for import
from adminjs side, how to pre-bundle files ?
is the .bundle.js in v7 still usable ? if yes, how ??
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants