Module not found: Error: Can't resolve 'crypto'

前端 未结 6 1798
萌比男神i
萌比男神i 2020-12-10 01:34

I am getting the following list of errors when I run ng serve.

My package JSON is as follows:

{   \"name\": \"ProName\",   \"version\":          


        
6条回答
  •  无人及你
    2020-12-10 02:02

    I ran into a similar issue lately while trying to use another library (tiff.js) in a small project I was experimenting with.

    The way I got around this was to add the following to my package.json file, right after the devDependencies section.

    "devDependencies": {
        ...
    },
    "browser": {
        "crypto": false
    }
    

    This didn't seem to have any adverse effect when trying to use the library in the application.

提交回复
热议问题