You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the nextJS frontend environment and trying to connect my Hasura backend with @refinedev/hasura. However, I've been encountering this issue from the start.
Server Error
SyntaxError: Named export 'mapValues' not found. The requested module 'lodash' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'lodash';
const {id:l},operation:u};let{query:q,variables:o}=E.subscription({operation:u,variables:{id:{value:l,type:"uuid",required:!0},...s.variables},fields:s.fields});return{query:q,variables:o,operation:u}};import Z from"lodash-es/mapKeys.js";import m from"camelcase";var j=n=>{if(n)return Z(n,(s,l)=>m(l))};import{mapValues: ee}from"lodash";var I=n=>{if(n)return ee(n,s=>s.toUpperCase())};import S from"camelcase";import O from"graphql-tag";var se=(n,s)=>{let{idType:l,namingConvention:u="hasura-default"}=s??{},i=u==="hasura-default",q=o=>typeof l=="function"?l(o):l??"uuid";return{getOne:async({resource:o,id:p,meta:e})=>{let r=i?${(e==null?void 0:e.operation)??o}_by_pk:g(${(e==null?void 0:e.operation)??o}_by_pk),t=S(r,{pascalCase:!0}),a=(e==null?void 0:e.gqlQuery)??(e==null?void 0:e.gqlMutation);if(a){let f=a,_={id:p} = pkg;
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
Hey @riyaz-binit-ai can you provide a minimal reproducible example? It's not helping if you don't provide as much as details possible, such as versions of the packages.
Hey @BatuhanW, Thanks for your quick response. I have installed the latest version of @refinedev/hasura (v6.6.4) and created a data provider from it. When I used the data provider in my application, it caused the above issue. However, after downgrading the package to @refinedev/[email protected], everything is now working fine without any issues. It seems that the issue is only occurring in the latest version.
Describe the bug
I'm using the nextJS frontend environment and trying to connect my Hasura backend with @refinedev/hasura. However, I've been encountering this issue from the start.
Server Error
SyntaxError: Named export 'mapValues' not found. The requested module 'lodash' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'lodash';
const {id:l},operation:u};let{query:q,variables:o}=E.subscription({operation:u,variables:{id:{value:l,type:"uuid",required:!0},...s.variables},fields:s.fields});return{query:q,variables:o,operation:u}};import Z from"lodash-es/mapKeys.js";import m from"camelcase";var j=n=>{if(n)return Z(n,(s,l)=>m(l))};import{mapValues: ee}from"lodash";var I=n=>{if(n)return ee(n,s=>s.toUpperCase())};import S from"camelcase";import O from"graphql-tag";var se=(n,s)=>{let{idType:l,namingConvention:u="hasura-default"}=s??{},i=u==="hasura-default",q=o=>typeof l=="function"?l(o):l??"uuid";return{getOne:async({resource:o,id:p,meta:e})=>{let r=i?
${(e==null?void 0:e.operation)??o}_by_pk
:g(${(e==null?void 0:e.operation)??o}_by_pk
),t=S(r,{pascalCase:!0}),a=(e==null?void 0:e.gqlQuery)??(e==null?void 0:e.gqlMutation);if(a){let f=a,_={id:p} = pkg;This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
file:///Users/riyaz/Projects/Binit/portal/node_modules/@refinedev/hasura/dist/index.mjs (21)
Steps To Reproduce
Just create a client with @refinedev/hasura
Expected behavior
--
Packages
Additional Context
No response
The text was updated successfully, but these errors were encountered: