question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can import electron-store in dev, but getting an error in prod.

See original GitHub issue

I want to use electron-store in node and web.

I can use electron-store in dev, but getting an error in prod.

When I import it this way

renderer: {
      resolve() {
        return ['electron-store']
      }
   }

dependencies: {
   "electron-store": "^8.1.0"
}

I got an error in prod: image

when I import it this way

renderer: {
      resolve() {
        return ['electron-store']
      }
   }

devDependencies: {
   "electron-store": "^8.1.0"
}

I got an error in prod: Cannot find module ‘electron-store’

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
caoxiemeihaocommented, Sep 8, 2022
npm i
# or
yarn
# or
pnpm i --shamefully-hoist
0reactions
fEyebrowcommented, Sep 8, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

electron-packager does not include 'electron-store' if it's in ...
I want to use and include the 'electron-store'. I installed it with the command: "npm install electron-store -g --save-dev". In my package.json ...
Read more >
Electron-packager: cannot find module
Two things you can try: Make sure every node modules that you need to run on production build added into dependencies in package.json....
Read more >
Product Import SSL – Local Development
There are 91 products that don't import because of this SSL error. My local dev site is built on “Local by Flywheel” and...
Read more >
streamhue/electron-store
Start using @streamhue/electron-store in your project by running ... You can use this module directly in both the main and renderer process.
Read more >
Troubleshooting import
I am sure that I set up my import file according to the Ecwid CSV file format – as far as I can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found