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.

`crypto` does not work in `npm run ng:serve`

See original GitHub issue

When using randomBytes from the crypto package, npm run electron:local works, but npm run ng:serve fails with crypto not found.

Same for npm run start

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ineiticommented, Aug 31, 2020

I don’t know why I’m still using javascript…

For time travellers, I think this makes more sense now: https://github.com/maximegris/angular-electron#use-electron--nodejs--3rd-party-libraries

Thank you very much!

0reactions
ineiticommented, Sep 11, 2020

Stupid question… if I want to use crypto not directly in a Component, but in AnotherClass, is there a better way than to pass the crypto from ElectronService through the Component to my AnotherClass?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module not found: Error: Can't resolve 'crypto' - Stack Overflow
The reason this happens is because when your run ng serve , it bundles up the dependencies you have in your package.json to...
Read more >
Error: Digest method not supported when running ng serve ...
It appears that the following resolutions configuration in the project's package.json combined with the preexisting package lock file is causing ...
Read more >
What is the difference between an NPM start and an NG serve?
First, NPM is a Node command line tool. One of it's functions is to run scripts you put into the package.json file. Have...
Read more >
scripts - npm Docs
Does not run during npm publish , but does run during npm ci and npm install . · Runs BEFORE the package is...
Read more >
Npm install not working. I tried updating angular like ... - Reddit
When running npm start, it actually runs ng serve, which is defined as such in your package.json file. The issue you're having is...
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