felixrieseberg/React-Dropzone-Component

Error: Cannot find module 'react'

fittyCent opened this issue · 1 comments

I added the component through npm and I'm getting this:

Error: Cannot find module 'react'
[1] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
[1] at Function.Module._load (internal/modules/cjs/loader.js:497:25)
[1] at Module.require (internal/modules/cjs/loader.js:626:17)
[1] at require (internal/modules/cjs/helpers.js:20:18)

I understand that I need to make react globally accessible but what's the best way to do this?

This always happens to me. I post a question then stumble upon what's wrong with my code right away.

I'm using a nodejs backend and a react frontend. I yarn added to dropzone to the backend code instead of the frontend...