Question: The following code in external node\_modules is not working:

`var _react = require('react');`

But:

`var _react = require('React');`

works. Now I have a problem that in some node\_modules it is required with 'react', and then I get this error:

`Uncaught Error: Cannot find module 'react'`

I am using gulp as build tool.

What can I do so that both requires will work?

Answer: 
Do you have 'React' added in your package.json ?

If not, add: "react": "17.0.2" (or another React version)

Try running the command:

```
npm install 

```

And try again
Require is not a React api. Try this syntax:

```
import React from 'react'

```