5

After switching from using next.js to a simpler parcel/webpack build, I've been trying to solve this particular error for over a week to no avail.

I'm out of ideas how to solve this so I hope some one on here can help.

Full error:

TypeError: (0 , n.default) is not a function
    at admin.js:47
    at admin.js:23
    at Object.next (admin.js:4)
    at p (redux-saga-core.esm.js:1157)
    at yn (redux-saga-core.esm.js:1108)
    at redux-saga-core.esm.js:585
    at d (redux-saga-core.esm.js:56)
    at Y (redux-saga-core.esm.js:584)
    at redux-saga-core.esm.js:1204
    at h (redux-saga-core.esm.js:1271)
m @ io-6de156f3.js:111

After digging into this for quite a while I figured out this error happens on this line in the admin.ts file:

https://github.com/marmelab/react-admin/blob/master/packages/ra-core/src/sideEffect/admin.ts#L29

Now what's really weird is that it seems like it's importing html from that ./error import instead of an actual JS module.

enter image description here

But that error is supposed to be a generator for some redux-saga stuff.

After switching to Parcel and being completely stumped by this error. I figured it might be some weird incompatibility between parcel and react-admin. So I switched out Parcel for a more typical webpack build... But the error persists through this. So it's likely nothing to do with the build tool.

Now to make things even more complex. If I manually go in and take out that error import and function call from the react-admin code.

a new error shows up 'o' is not a function so it seems to me that there's something seriously screwed up.

I have not changed the version or implementation of react-admin at all.

This is using "react-admin": "^2.9.8",

Any help with this would be greatly appreciated!

MLyck
  • 4,959
  • 13
  • 43
  • 74

0 Answers0