appversion icon indicating copy to clipboard operation
appversion copied to clipboard

Error: Cannot find module "."

Open chrisyaxley opened this issue 7 years ago • 1 comments

When trying to use the In App features to get the current version number I get the error

Error: Cannot find module "." in the browsers console, causing the rest of the app to crash.

I have added

node: { fs: 'empty' },

To my Webpack configuration in order to fix the other current open issue Missing dependency fs

import {
    getAppVersion,
    getAppVersionSync,
    composePattern,
    composePatternSync
} from 'appversion';

componentDidMount() {

    console.log(getAppVersionSync());
    console.log(getAppVersionSync().version);

    getAppVersion((err, data) => {
      if (err) console.log(err);
      console.log(data);
    });

    console.log(composePatternSync('M.m.p-Ss n-d'));

    composePattern('M.m.p-Ss n-d', (ptt) => {
      console.log(ptt);
    });

}

Anyone got any ideas?

Thanks, Chris

chrisyaxley avatar Mar 14 '18 11:03 chrisyaxley

Hello! Currently I have no time to fix this, feel free to send a pr!

delvedor avatar Mar 19 '18 08:03 delvedor