Formik: Can't resolve 'create-react-context' in 'node_modules\formik\dist'

Created on 16 Feb 2019  路  6Comments  路  Source: formium/formik

馃悰 Bug report

I'm getting:

ERROR in ../node_modules/formik/dist/formik.esm.js
Module not found: Error: Can't resolve 'create-react-context' in 'node_modules\formik\dist'

This gets resolved if I add create-react-context as a dependency. This shouldn't be necessary since I'm using React 16.8.2.

Your environment

| Software | Version(s) |
| ---------------- | ---------- |
| Formik | 1.5.0 |
| React | 16.8.2 |
| TypeScript | |
| Browser | NA |
| npm/Yarn | yarn 1.13.0 |
| Operating System | windows |

Most helpful comment

This is still a problem, getting the same error: ModuleNotFoundError: Module not found: Error: Can't resolve 'create-react-context' in '/Users/thbm/dev/frontend/node_modules/formik/dist' but it is resolved by adding create-react-context, but this is not ideal. Looked through https://github.com/jaredpalmer/formik/issues/720 but solutions provided there don't work for us as we aren't using any typescript in our repository.

Software | Version(s)
-- | --
Formik | 1.5.2
React | 16.8.5
TypeScript | NA 聽
Browser | NA
npm/Yarn | yarn 1.13.0
Operating System | Mac
Node | 8.11.1

All 6 comments

I too am having the same issue with almost the same enviroment variables, except in Linux.

Just wanted to mention this is also discussed in #720.

Got this one time to time when app run

/home/....../node_modules/formik/dist/connect.d.ts
(3,66): Cannot find module 'create-react-context'.

Formik 1.5.1, Typescript: 3.3.4000, React 16.8.5, Create React App on Ubuntu 18.04.2

Try 1.5.2?

So far so good... Closing.

This is still a problem, getting the same error: ModuleNotFoundError: Module not found: Error: Can't resolve 'create-react-context' in '/Users/thbm/dev/frontend/node_modules/formik/dist' but it is resolved by adding create-react-context, but this is not ideal. Looked through https://github.com/jaredpalmer/formik/issues/720 but solutions provided there don't work for us as we aren't using any typescript in our repository.

Software | Version(s)
-- | --
Formik | 1.5.2
React | 16.8.5
TypeScript | NA 聽
Browser | NA
npm/Yarn | yarn 1.13.0
Operating System | Mac
Node | 8.11.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jungwoo-An picture Jungwoo-An  路  3Comments

jaredpalmer picture jaredpalmer  路  3Comments

najisawas picture najisawas  路  3Comments

jordantrainor picture jordantrainor  路  3Comments

pmonty picture pmonty  路  3Comments