Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Error: Can't resolve 'crypto' in '.... #195

Closed
ctrleffive opened this issue Jun 5, 2018 · 7 comments
Closed

Module not found: Error: Can't resolve 'crypto' in '.... #195

ctrleffive opened this issue Jun 5, 2018 · 7 comments

Comments

@ctrleffive
Copy link

Im trying to run npm run electron:local right after npm install.
It is showing these warnings. But application is successfully launched.

WARNING in ./node_modules/zone.js/dist/zone-mix.js
Module not found: Error: Can't resolve 'crypto' in '/home/chandu/Developer/saira-kiosk/node_modules/zone.js/dist'

WARNING in ./node_modules/zone.js/dist/zone-mix.js
Module not found: Error: Can't resolve 'fs' in '/home/chandu/Developer/saira-kiosk/node_modules/zone.js/dist'

WARNING in ./node_modules/zone.js/dist/zone-mix.js
Module not found: Error: Can't resolve 'timers' in '/home/chandu/Developer/saira-kiosk/node_modules/zone.js/dist'

NOTE: No files are changed since the cloning.

@fott1
Copy link

fott1 commented Jun 7, 2018

I tried npm install timers and the warning about timers is now gone. I don't have a clue about the rest though.

@ctrleffive
Copy link
Author

yeh. i've also tried npm install timers crypto fs. but only the warning about the timers is gone.

@jeanRandria
Copy link

I have also these warnings and with npm install timers the warning about timers is gone not the rest!!!

@maximegris
Copy link
Owner

Please have a look at the last version (4.1.0) [especially commits 165c50a 1c403a8 50657d0]
It should makes node modules (and other native libs) working and remove require errors.

@liuhongbo
Copy link

i just clone master branch, and did npm run ng:serve:web, those 3 warnings are still there
did i miss something?

@theCrius
Copy link

theCrius commented Mar 6, 2019

I've updated from the version using angular 5.x, to using angular 7.x

Our configuration here is basically having the electron part interfacing with a custom hardware connected to the computer, and loading a remote angular website (hence the updating only angular 5 to 7)

I'd really like some guidance on this issue as this was the first electron app I created and I don't really know where to look.

@corner100
Copy link

corner100 commented Sep 29, 2019

After running ng update @angular/cli @angular/core two warnings disappeared.
Just this one left:

WARNING in ./node_modules/zone.js/dist/zone-mix.js
Module not found: Error: Can't resolve 'fs' in '/home/user/Projects/AngularElectron/node_modules/zone.js/dist'

So it seems that the angular version was not right

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants