title: Error: Cannot find module 'renderer/utils/localStore'
body: <p>I am trying to call userDir function to get userdata folder path in the <code>main/main.ts</code>. I am using the electron-react-boilerplate</p>
  <pre class="lang-js prettyprint-override"><code>const electron = require('electron');
  const path = require('path');
  const fs = require('fs');
  
  
  export function userDir() {
    return (electron.app || electron.remote.app).getPath('userData');
  }
  
  </code></pre>
  <p>I am caling the userDir function in the main.ts file</p>
  <pre class="lang-js prettyprint-override"><code>import { userDir } from 'renderer/utils/localStore';
  
  
  userDir()
  </code></pre>
  <p>Error:</p>
  <pre><code>Electron encountered an error
  Error: Cannot find module 'renderer/utils/localStore'
  Require stack:
  - /home/prash/Projects/Electron/pomodoro/src/main/main.ts
  - /home/prash/Projects/Electron/pomodoro/node_modules/.pnpm/electron@18.3.2/node_modules/electron/dist/resources/default_app.asar/main.js
  - 
      at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
      at Function.n._resolveFilename (node:electron/js2c/browser_init:245:1105)
      at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/prash/Projects/Electron/pomodoro/node_modules/.pnpm/@cspotcode+source-map-support@0.8.1/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
      at Function.Module._load (/home/prash/Projects/Electron/pomodoro/node_modules/.pnpm/runtime-required@1.1.0/node_modules/runtime-required/runtime-required.js:28:44)
      at Module.require (node:internal/modules/cjs/loader:1012:19)
      at require (node:internal/modules/cjs/helpers:102:18)
      at Object.&lt;anonymous&gt; (/home/prash/Projects/Electron/pomodoro/src/main/main.ts:15:1)
      at Module._compile (node:internal/modules/cjs/loader:1116:14)
      at Module.m._compile (/home/prash/Projects/Electron/pomodoro/node_modules/.pnpm/ts-node@10.8.0_wxuian5givsywcqjoc4lpn66fa/node_modules/ts-node/src/index.ts:1597:23)
      at Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
      ```
  </code></pre>