functionland / fula-sec

Fula Security Library for DID creation and sharing
1 stars 1 forks source link

Error: While trying to resolve module `did-jwt` #7

Closed ehsan6sha closed 1 year ago

ehsan6sha commented 1 year ago

Error: While trying to resolve module did-jwt from file G:\...\OpenSources\photos\node_modules\@functionland\fula -sec\lib\cjs\did\did.js, the package G:\...\OpenSources\photos\node_modules\did-jwt\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (G:\...\OpenSources\photos\node_m odules\did-jwt\lib\index.cjs. Indeed, none of these files exist:

ghorbani-m commented 1 year ago

I changed the sourceExts in the metro.config.js

 resolver: {
    extraNodeModules: {
      // eslint-disable-next-line no-undef
      ...require('node-libs-react-native'),
      // eslint-disable-next-line no-undef
      crypto: require.resolve('react-native-crypto'),
    },
    sourceExts: ['jsx', 'js', 'ts', 'tsx', 'cjs', 'json'],   //<---- Add this line
  },
Ruffiano commented 1 year ago

This problem was solved in the latest version of fula-sec (v.2.0.0).