Code Monkey home page Code Monkey logo

ra-data-nestjsx-crud's People

Contributors

adxn94 avatar amauryliet avatar dependabot[bot] avatar ggirodda avatar gregsj avatar k0rgath avatar ockam avatar rayman1104 avatar sergeymell avatar teebow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ra-data-nestjsx-crud's Issues

How to correctly pass OR in cumulative filters?

Hi guys! I want to select more than one category but I'm confused about how to use OR in cumulative filters.

An example from react-admin documentation suggests to use arrays to store it:
https://marmelab.com/react-admin/FilterList.html#cumulative-filters

But this array throws an error:

TypeError: flatFilter[key].match is not a function
    at ra-data-nestjsx-crud.ts:47:37

I see $OR: orFilter key in this repository, but the question is how to correctly pass the values to this filter?

https://github.com/nestjsx/crud/wiki/Requests#or

Here is an example of my filter

<FilterList label="Category" icon={<CategoryIcon />}>
    <FilterListItem label="a" value={{ category: 'a' }} isSelected={isSelectedCategory} toggleFilter={toggleFilterCategory} />
    <FilterListItem label="b" value={{ category: 'b' }} isSelected={isSelectedCategory} toggleFilter={toggleFilterCategory} />
    <FilterListItem label="c" value={{ category: 'c' }} isSelected={isSelectedCategory} toggleFilter={toggleFilterCategory} />
</FilterList>

Provide me with some examples, please! Thanks for your help!

Add option to force "fullUpdates"

We had difficulities using this provider when having a strict validation on the entities.

To make this work, we removed the logic to only send changed values during the update request:

update: (resource, params) => {
    //Hint: We changed this code here manually to provide full updates always. We should do pull-request for this option.
    const data = params.data;

Perhaps we can pull this back into this library as an additional option during creation (e.g. {forceFullUpdates: true})

Support case-insensitive comparison for filters

According to nestjsx/crud it supports filter arguments for case-insensitive comparisons for strings:

https://github.com/nestjsx/crud/blob/bbea082a3f0fc7c1be42a79164f41b8449ad2251/packages/crud-request/src/types/request-query.types.ts

CondOperator.CONTAINS_LOW is the filter type

It would be very helpful for searching/filtering on text columns.

Workaround code:

// TODO: This is a "hack" to pass $contL for filters where we want case insensitive search
      if (params.filter.buyer?.name) {
        debugger;
        const {
          buyer: { name: nameFilter },
          ...otherFilters
        } = filter;
        filter = { ...otherFilters, buyer: { ["name" + "||$contL"]: nameFilter } };
      }

How to catch http errors from REST api?

I am using nest.js a crud REST API resource. When I delete a record from react-admin UI, the DELETE method of the nestjs crud resource is called via my ra-data-nestjsx-crud dataprovider of my react admin app. This delete action however fails because it violates a foreign key constraint in the underlying mysql database. The nestjs API server throws a server error (httpcode 500):

[Nest] 4510 - 11/27/2023, 8:44:54 PM ERROR [ExceptionsHandler] Cannot delete or update a parent row: a foreign key constraint fails (mydb.mytable, CONSTRAINT my_other_table_ibfk_5 FOREIGN KEY (my_id) REFERENCES my_table (id))
QueryFailedError: Cannot delete or update a parent row: a foreign key constraint fails (mydb.my_other_table, CONSTRAINT my_other_table_ibfk_5 FOREIGN KEY (my_id) REFERENCES my_table (id))
at Query.onResult (/volume1/web/my-api/src/driver/mysql/MysqlQueryRunner.ts:222:33)
at Query.execute (/volume1/web/my-api/node_modules/mysql2/lib/commands/command.js:36:14)
at PoolConnection.handlePacket (/volume1/web/my-api/node_modules/mysql2/lib/connection.js:456:32)
at PacketParser.onPacket (/volume1/web/my-api/node_modules/mysql2/lib/connection.js:85:12)
at PacketParser.executeStart (/volume1/web/my-api/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket. (/volume1/web/my-api/node_modules/mysql2/lib/connection.js:92:25)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Socket.Readable.push (node:internal/streams/readable:234:10)

I want to catch this error in react-admin and present a more explanatory error message to the user. How can I catch this error in my react admin app that users an ra-data-nestjsx-crud dataprovider?

Headers in Data Provider

Hey there! First of all, thank you for maintaining this library.

I was trying to add an "Authorization Bearer" header to the Data Provider, but I'm not seeing in the docs a way to do it.

Thanks in advance!

SelectArrayInput not supported

`import {
BooleanInput,
SelectArrayInput,
SelectInput,
TextInput,
} from "react-admin";

const stringValuePlans = localStorage.getItem("hotelPlans");
let plans = [];
if (stringValuePlans) {
plans = JSON.parse(stringValuePlans);
console.log(plans);
}

let subscriptionStateChoices = [
{
id: "future",
name: "Future",
},
{
id: "in_trial",
name: "In trial",
},
{
id: "active",
name: "Active",
},
{
id: "non_renewing",
name: "Non renewing",
},
{
id: "paused",
name: "Paused",
},
{
id: "cancelled",
name: "Cancelled",
},
];

export const postFilters = [
,
,
<SelectArrayInput
key="name"
source="name"
label="Select plan"
choices={plans?.map((plan: any) => ({ id: plan?.id, name: plan?.name }))}
alwaysOn
/>,
,
,
,
];
`
console.js:213 TypeError: flatFilter[key].match is not a function
at index.ts:41:182
at Array.map ()
at composeFilter (index.ts:34:34)
at Object.getList (index.ts:68:15)
at Proxy. (useDataProvider.ts:103:30)
at Object.queryFn (useGetList.ts:75:18)
at Object.fetchFn2 [as fn] (query.js:300:29)
at run2 (retryer.js:95:31)
at new Retryer2 (retryer.js:156:3)
at Query2.fetch2 [as fetch] (query.js:332:20)
overrideMethod @ console.js:213
(anonymous) @ useDataProvider.ts:133
(anonymous) @ useGetList.ts:75
fetchFn2 @ query.js:300
run2 @ retryer.js:95
Retryer2 @ retryer.js:156
fetch2 @ query.js:332
executeFetch @ queryObserver.js:199
fetch2 @ queryObserver.js:188
refetch2 @ queryObserver.js:168
onFocus @ query.js:153
(anonymous) @ queryCache.js:131
(anonymous) @ queryCache.js:130
batch2 @ notifyManager.js:25
onFocus @ queryCache.js:129
(anonymous) @ queryClient.js:32
(anonymous) @ focusManager.js:76
onFocus @ focusManager.js:75
(anonymous) @ focusManager.js:61
listener2 @ focusManager.js:17
Show 20 more frames
Show less
console.js:213 Error: The dataProvider threw an error. It should return a rejected Promise instead.
at Proxy. (useDataProvider.ts:135:31)
at Object.queryFn (useGetList.ts:75:18)
at Object.fetchFn2 [as fn] (query.js:300:29)
at run2 (retryer.js:95:31)
at new Retryer2 (retryer.js:156:3)
at Query2.fetch2 [as fetch] (query.js:332:20)
at QueryObserver2.executeFetch (queryObserver.js:199:37)
at QueryObserver2.fetch2 [as fetch] (queryObserver.js:188:17)
at QueryObserver2.refetch2 [as refetch] (queryObserver.js:168:17)
at Query2.onFocus (query.js:153:16)
overrideMethod @ console.js:213
onError @ query.js:358
reject2 @ retryer.js:67
(anonymous) @ retryer.js:132
Promise.catch (async)
run2 @ retryer.js:116
Retryer2 @ retryer.js:156
fetch2 @ query.js:332
executeFetch @ queryObserver.js:199
fetch2 @ queryObserver.js:188
refetch2 @ queryObserver.js:168
onFocus @ query.js:153
(anonymous) @ queryCache.js:131
(anonymous) @ queryCache.js:130
batch2 @ notifyManager.js:25
onFocus @ queryCache.js:129
(anonymous) @ queryClient.js:32
(anonymous) @ focusManager.js:76
onFocus @ focusManager.js:75
(anonymous) @ focusManager.js:61
listener2 @ focusManager.js:17
Show 20 more frames
Show less
1691570057209-Logo.png:1 GET http://localhost:5173/aVALIp0BzvatU65HC8VrSmk-SMg=/240x240/smart/rh-staging/2213774826167296/1691570057209-Logo.png 404 (Not Found)
Image (async)
commitMount @ react-dom.development.js:11038
commitLayoutEffectOnFiber @ react-dom.development.js:23407
commitLayoutMountEffects_complete @ react-dom.development.js:24688
commitLayoutEffects_begin @ react-dom.development.js:24674
commitLayoutEffects_begin @ react-dom.development.js:24656
commitLayoutEffects @ react-dom.development.js:24612
commitRootImpl @ react-dom.development.js:26823
commitRoot @ react-dom.development.js:26682
finishConcurrentRender @ react-dom.development.js:25981
performConcurrentWorkOnRoot @ react-dom.development.js:25809
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
Show 13 more frames
Show less
console.js:213 TypeError: flatFilter[key].match is not a function
at index.ts:41:182
at Array.map ()
at composeFilter (index.ts:34:34)
at Object.getList (index.ts:68:15)
at Proxy. (useDataProvider.ts:103:30)
at Object.queryFn (useGetList.ts:75:18)
at Object.fetchFn2 [as fn] (query.js:300:29)
at run2 (retryer.js:95:31)
at new Retryer2 (retryer.js:156:3)
at Query2.fetch2 [as fetch] (query.js:332:20) '\n at ListBase (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:14880:25)\n at List3 (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:146315:24)\n at ListHotels (http://localhost:5173/src/pages/HotelsList/index.tsx?t=1696832136728:26:3)\n at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3251:5)\n at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3669:5)\n at ResourceContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20776:25)\n at Resource (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20792:26)\n at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3251:5)\n at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3669:5)\n at Suspense\n at ErrorBoundary2 (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:54281:35)\n at div\n at main\n at div\n at div\n at http://localhost:5173/node_modules/.vite/deps/chunk-MRX2TNXS.js?v=59557cab:4532:50\n at Layout (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:54679:20)\n at div\n at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3251:5)\n at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3669:5)\n at CoreAdminRoutes (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20428:7)\n at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3251:5)\n at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3669:5)\n at CoreAdminUI (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20502:22)\n at div\n at http://localhost:5173/node_modules/.vite/deps/chunk-MRX2TNXS.js?v=59557cab:4532:50\n at ScopedCssBaseline2 (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:41677:17)\n at AdminUI (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:146902:17)\n at ThemeProvider2 (http://localhost:5173/node_modules/.vite/deps/chunk-MRX2TNXS.js?v=59557cab:7739:5)\n at ThemeProvider3 (http://localhost:5173/node_modules/.vite/deps/chunk-MRX2TNXS.js?v=59557cab:7826:5)\n at ThemeProvider (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:4054:12)\n at ThemeProvider2 (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:55107:24)\n at ResourceDefinitionContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20023:19)\n at NotificationContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:1502:25)\n at I18nContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:22710:19)\n at Router (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3616:15)\n at HistoryRouter (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6597:21)\n at InternalRouter (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6663:25)\n at BasenameContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6632:25)\n at AdminRouter (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6649:24)\n at QueryClientProvider2 (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6028:25)\n at PreferencesEditorContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:19934:25)\n at StoreContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:1363:22)\n at CoreAdminContext (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20066:32)\n at AdminContext (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:146939:21)\n at Admin (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:147222:28)\n at App'
overrideMethod @ console.js:213
(anonymous) @ useDataProvider.ts:133
(anonymous) @ useGetList.ts:75
fetchFn2 @ query.js:300
run2 @ retryer.js:95
Retryer2 @ retryer.js:156
fetch2 @ query.js:332
executeFetch @ queryObserver.js:199
setOptions @ queryObserver.js:85
(anonymous) @ useBaseQuery.js:78
commitHookEffectListMount @ react-dom.development.js:23150
commitPassiveMountOnFiber @ react-dom.development.js:24926
commitPassiveMountEffects_complete @ react-dom.development.js:24891
commitPassiveMountEffects_begin @ react-dom.development.js:24878
commitPassiveMountEffects @ react-dom.development.js:24866
flushPassiveEffectsImpl @ react-dom.development.js:27039
flushPassiveEffects @ react-dom.development.js:26984
(anonymous) @ react-dom.development.js:26769
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
Show 21 more frames
Show less
console.js:213 Error: The dataProvider threw an error. It should return a rejected Promise instead.
at Proxy. (useDataProvider.ts:135:31)
at Object.queryFn (useGetList.ts:75:18)
at Object.fetchFn2 [as fn] (query.js:300:29)
at run2 (retryer.js:95:31)
at new Retryer2 (retryer.js:156:3)
at Query2.fetch2 [as fetch] (query.js:332:20)
at QueryObserver2.executeFetch (queryObserver.js:199:37)
at QueryObserver2.setOptions (queryObserver.js:85:12)
at useBaseQuery.js:78:14
at commitHookEffectListMount (react-dom.development.js:23150:26)
overrideMethod @ console.js:213
onError @ query.js:358
reject2 @ retryer.js:67
(anonymous) @ retryer.js:132
Promise.catch (async)
run2 @ retryer.js:116
Retryer2 @ retryer.js:156
fetch2 @ query.js:332
executeFetch @ queryObserver.js:199
setOptions @ queryObserver.js:85
(anonymous) @ useBaseQuery.js:78
commitHookEffectListMount @ react-dom.development.js:23150
commitPassiveMountOnFiber @ react-dom.development.js:24926
commitPassiveMountEffects_complete @ react-dom.development.js:24891
commitPassiveMountEffects_begin @ react-dom.development.js:24878
commitPassiveMountEffects @ react-dom.development.js:24866
flushPassiveEffectsImpl @ react-dom.development.js:27039
flushPassiveEffects @ react-dom.development.js:26984
(anonymous) @ react-dom.development.js:26769
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
Show 21 more frames
Show less
1691570057209-Logo.png:1 GET http://localhost:5173/aVALIp0BzvatU65HC8VrSmk-SMg=/240x240/smart/rh-staging/2213774826167296/1691570057209-Logo.png 404 (Not Found)
Image (async)
commitMount @ react-dom.development.js:11038
commitLayoutEffectOnFiber @ react-dom.development.js:23407
commitLayoutMountEffects_complete @ react-dom.development.js:24688
commitLayoutEffects_begin @ react-dom.development.js:24674
commitLayoutEffects_begin @ react-dom.development.js:24656
commitLayoutEffects @ react-dom.development.js:24612
commitRootImpl @ react-dom.development.js:26823
commitRoot @ react-dom.development.js:26682
finishConcurrentRender @ react-dom.development.js:25981
performConcurrentWorkOnRoot @ react-dom.development.js:25809
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
Show 13 more frames
Show less
console.js:213 TypeError: flatFilter[key].match is not a function
at index.ts:41:182
at Array.map ()
at composeFilter (index.ts:34:34)
at Object.getList (index.ts:68:15)
at Proxy. (useDataProvider.ts:103:30)
at Object.queryFn (useGetList.ts:75:18)
at Object.fetchFn2 [as fn] (query.js:300:29)
at run2 (retryer.js:95:31)
at new Retryer2 (retryer.js:156:3)
at Query2.fetch2 [as fetch] (query.js:332:20) '\n at ListBase (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:14880:25)\n at List3 (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:146315:24)\n at ListHotels (http://localhost:5173/src/pages/HotelsList/index.tsx?t=1696832136728:26:3)\n at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3251:5)\n at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3669:5)\n at ResourceContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20776:25)\n at Resource (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20792:26)\n at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3251:5)\n at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3669:5)\n at Suspense\n at ErrorBoundary2 (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:54281:35)\n at div\n at main\n at div\n at div\n at http://localhost:5173/node_modules/.vite/deps/chunk-MRX2TNXS.js?v=59557cab:4532:50\n at Layout (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:54679:20)\n at div\n at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3251:5)\n at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3669:5)\n at CoreAdminRoutes (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20428:7)\n at RenderedRoute (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3251:5)\n at Routes (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3669:5)\n at CoreAdminUI (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20502:22)\n at div\n at http://localhost:5173/node_modules/.vite/deps/chunk-MRX2TNXS.js?v=59557cab:4532:50\n at ScopedCssBaseline2 (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:41677:17)\n at AdminUI (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:146902:17)\n at ThemeProvider2 (http://localhost:5173/node_modules/.vite/deps/chunk-MRX2TNXS.js?v=59557cab:7739:5)\n at ThemeProvider3 (http://localhost:5173/node_modules/.vite/deps/chunk-MRX2TNXS.js?v=59557cab:7826:5)\n at ThemeProvider (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:4054:12)\n at ThemeProvider2 (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:55107:24)\n at ResourceDefinitionContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20023:19)\n at NotificationContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:1502:25)\n at I18nContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:22710:19)\n at Router (http://localhost:5173/node_modules/.vite/deps/chunk-VSSR7JQR.js?v=59557cab:3616:15)\n at HistoryRouter (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6597:21)\n at InternalRouter (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6663:25)\n at BasenameContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6632:25)\n at AdminRouter (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6649:24)\n at QueryClientProvider2 (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:6028:25)\n at PreferencesEditorContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:19934:25)\n at StoreContextProvider (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:1363:22)\n at CoreAdminContext (http://localhost:5173/node_modules/.vite/deps/chunk-S5LHN3CM.js?v=59557cab:20066:32)\n at AdminContext (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:146939:21)\n at Admin (http://localhost:5173/node_modules/.vite/deps/react-admin.js?v=59557cab:147222:28)\n at App'
overrideMethod @ console.js:213
(anonymous) @ useDataProvider.ts:133
(anonymous) @ useGetList.ts:75
fetchFn2 @ query.js:300
run2 @ retryer.js:95
Retryer2 @ retryer.js:156
fetch2 @ query.js:332
executeFetch @ queryObserver.js:199
setOptions @ queryObserver.js:85
(anonymous) @ useBaseQuery.js:78
commitHookEffectListMount @ react-dom.development.js:23150
commitPassiveMountOnFiber @ react-dom.development.js:24926
commitPassiveMountEffects_complete @ react-dom.development.js:24891
commitPassiveMountEffects_begin @ react-dom.development.js:24878
commitPassiveMountEffects @ react-dom.development.js:24866
flushPassiveEffectsImpl @ react-dom.development.js:27039
flushPassiveEffects @ react-dom.development.js:26984
performConcurrentWorkOnRoot @ react-dom.development.js:25709
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
Show 21 more frames
Show less
console.js:213 Error: The dataProvider threw an error. It should return a rejected Promise instead.
at Proxy. (useDataProvider.ts:135:31)
at Object.queryFn (useGetList.ts:75:18)
at Object.fetchFn2 [as fn] (query.js:300:29)
at run2 (retryer.js:95:31)
at new Retryer2 (retryer.js:156:3)
at Query2.fetch2 [as fetch] (query.js:332:20)
at QueryObserver2.executeFetch (queryObserver.js:199:37)
at QueryObserver2.setOptions (queryObserver.js:85:12)
at useBaseQuery.js:78:14
at commitHookEffectListMount (react-dom.development.js:23150:26)

need update

import omitBy from 'lodash.omitby'

is not supported now could you update that ?

Compatible with React 18/React Admin 4.5?

Does this support React 18/React Admin 4.5? I am seeing the below errors when trying to compile:

Module not found: Error: Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/lodash.omitBy/lodash.omitby'.
WARNING in ./node_modules/@nestjsx/crud-request/lib/exceptions/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/exceptions/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/exceptions/index.ts'

WARNING in ./node_modules/@nestjsx/crud-request/lib/exceptions/request-query.exception.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/exceptions/request-query.exception.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/exceptions/request-query.exception.ts'

WARNING in ./node_modules/@nestjsx/crud-request/lib/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/index.ts'

WARNING in ./node_modules/@nestjsx/crud-request/lib/request-query.builder.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/request-query.builder.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/request-query.builder.ts'

WARNING in ./node_modules/@nestjsx/crud-request/lib/request-query.parser.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/request-query.parser.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/request-query.parser.ts'

WARNING in ./node_modules/@nestjsx/crud-request/lib/request-query.validator.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/request-query.validator.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/request-query.validator.ts'

WARNING in ./node_modules/@nestjsx/crud-request/lib/types/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/types/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/types/index.ts'

WARNING in ./node_modules/@nestjsx/crud-request/lib/types/request-query.types.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/types/request-query.types.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/crud-request/src/types/request-query.types.ts'

WARNING in ./node_modules/@nestjsx/util/lib/checks.util.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/util/src/checks.util.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/util/src/checks.util.ts'

WARNING in ./node_modules/@nestjsx/util/lib/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/util/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/util/src/index.ts'

WARNING in ./node_modules/@nestjsx/util/lib/obj.util.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/util/src/obj.util.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/@nestjsx/util/src/obj.util.ts'

WARNING in ./node_modules/ra-data-nestjsx-crud/lib/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ababra/projects/booktime-admin/node_modules/ra-data-nestjsx-crud/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/ababra/projects/booktime-admin/node_modules/ra-data-nestjsx-crud/src/index.ts'

ERROR in ./node_modules/ra-data-nestjsx-crud/lib/index.js 20:40-64
Module not found: Error: Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/lodash.omitBy/lodash.omitby'.

webpack compiled with 1 error and 12 warnings

Accepting pull requests?

Hello!

We are considering forking this module for the same reasons you have. Would prefer to collaborate with you if you are interested.

Please let us know if you plan to maintain and/or are accepting pull requests.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.