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.

Error: Cannot find module 'electron-pos-printer' Require stack:

See original GitHub issue

This is how I access electron-pos-printer : `import React, { useEffect, useState } from ‘react’ import { ProductListProp } from ‘…/kasir/ProductListView’ import path from ‘path’; import { Button, RadioGroup, RenderIf } from ‘react-rainbow-components’;

interface RadioValue { value: string, label: string }

export const CheckoutStruk: React.FC<any & ProductListProp> = (props: any) => {

let { remote } = require(“electron”);

const { PosPrinter } = remote.require(“electron-pos-printer”); ` It works well in development, but when I build for production, this happens : image Anyone face the same issue ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
davimatoscommented, Dec 29, 2021

Possible solution #46

1reaction
Ahmed-Sarmoumcommented, May 11, 2021

I have the same problem, in my case i use vue-electron, Did you resolve it? Capture

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'electron' - node.js - Stack Overflow
3" version of Electron. The problem that I'm having is that when I try to include the 'electron' module in a renderer process...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
In my case, I need to install the react-icons package so the freeCodeCamp icon can be resolved. I'll do that by running yarn...
Read more >
I have an error it says: Error: Cannot find module '.env'
Error : Cannot find module '.env' Require stack: C:\Users\User\Desktop\mongoDB\mflix-js\index.js at Function.Module.
Read more >
Error: Cannot find module - Running Tests - CircleCI Discuss
Hi, While running test in cirlce CI I am facing this issue. Error: Cannot find module '@pages/CreateCertificatePage' Require stack: ...
Read more >
Npm can't find module "semver" error in Ubuntu 19.04
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up. ... Stack...
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