Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed May 31, 2023
1 parent 7968a7f commit ec5eef8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,15 +527,15 @@ There are two alternatives to this approach:

### Why am I getting the error `Module not found: Error: Can't resolve 'crypto|fs|os|path'`?

You are using dotenv on the front-end. Webpack < 5 used to include polyfills for core Node.js modules like `crypto`, `fs`, `os`, and `path`. So today, you need to install and configure a polyfill for it.
You are using dotenv on the front-end. Webpack < 5 used to include polyfills for core Node.js modules like `crypto`, `fs`, `os`, and `path`. It doesn't any longer, so these days you need to install and configure a polyfill for it.

```bash
npm install crypto-browserify
```

And then configure it in your webpack config.

```json
```js
resolve.fallback: { "crypto": require.resolve("crypto-browserify") }
```

Expand Down

0 comments on commit ec5eef8

Please sign in to comment.