Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Failed to compile] Module not found: Can't resolve 'redux-persist/constants' in 'redux-persist-crosstab' #22

Open
shermendev opened this issue Dec 28, 2018 · 3 comments

Comments

@shermendev
Copy link

Hi,
I keep getting this error:

Failed to compile.

./node_modules/redux-persist-crosstab/index.js
Module not found: Can't resolve 'redux-persist/constants' in 'node_modules\redux-persist-crosstab'

"redux-persist-crosstab": "^3.7.0"

Minimum code to reproduce:

import crosstabSync from 'redux-persist-crosstab'

crosstabSync()
@shermendev
Copy link
Author

Just tested the 4.0 version, still getting an error
"redux-persist-crosstab": "^4.0.0-0"

Failed to compile.

./node_modules/redux-persist-crosstab/index.js
SyntaxError: \node_modules\redux-persist-crosstab\index.js: Unexpected token (3:12)

  1 | // @flow
  2 | import { KEY_PREFIX, REHYDRATE } from 'redux-persist/lib/constants'
> 3 | import type { PersistConfig } from 'redux-persist/es/types'
    |             ^
  4 | import type { Store } from 'redux'
  5 |
  6 | type CrosstabConfig = {

@brandoncc
Copy link

I also can't add this. Is there a solution to allow this to be used @rt2zz?

@Max-Z80
Copy link

Max-Z80 commented Jul 3, 2019

Hello, I have the same problem here. I think index.js should be transpiled to use terms that nodejs understands such as 'exports' and 'require' instead of 'import'.
My current ugly temporary solution was to copy the function to the index.js of my react app, then convert the syntax to js (because that's the syntax I am using for this app), and finally add the proper imports. 2 min work.
Works great.
I would prefer to use this package instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants