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
@xmtp/react-sdk throws the follwing error in the console when executing "yarn dev" and the application gets stuck there:
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/Users/doktordos/Developer/ensvision/node_modules/date-fns/min' is not supported resolving ES modules imported from /Users/doktordos/Developer/ensvision/node_modules/@xmtp/react-sdk/lib/index.js
Did you mean to import date-fns/min/index.js?
I tried changing the imports in node_modules/@xmtp/react-sdk as follows:
/node_modules/@xmtp/react-sdk/lib/index.js
Lines 10-11:
import Gt from 'date-fns/min';
import $t from 'date-fns/subSeconds';
to:
import { min as Gt} from 'date-fns';
import { subSeconds as $t} from 'date-fns';
and afterwards all works as expected.
Could you please change the following imports so the package will work out of the box on next.js: 0b215a6
Expected behavior
See above.
Steps to reproduce the bug
Installed package @xmtp/react-sdk in next.js project via yarn add @xmtp/react-sdk throws above mentioned error in console.
The text was updated successfully, but these errors were encountered:
Describe the bug
@xmtp/react-sdk throws the follwing error in the console when executing "yarn dev" and the application gets stuck there:
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/Users/doktordos/Developer/ensvision/node_modules/date-fns/min' is not supported resolving ES modules imported from /Users/doktordos/Developer/ensvision/node_modules/@xmtp/react-sdk/lib/index.js
Did you mean to import date-fns/min/index.js?
I tried changing the imports in node_modules/@xmtp/react-sdk as follows:
/node_modules/@xmtp/react-sdk/lib/index.js
Lines 10-11:
import Gt from 'date-fns/min';
import $t from 'date-fns/subSeconds';
to:
import { min as Gt} from 'date-fns';
import { subSeconds as $t} from 'date-fns';
and afterwards all works as expected.
Could you please change the following imports so the package will work out of the box on next.js:
0b215a6
Expected behavior
See above.
Steps to reproduce the bug
Installed package @xmtp/react-sdk in next.js project via yarn add @xmtp/react-sdk throws above mentioned error in console.
The text was updated successfully, but these errors were encountered: