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 #1

Open
vichaunter opened this issue Feb 20, 2019 · 1 comment
Open

Failed to compile, module not found #1

vichaunter opened this issue Feb 20, 2019 · 1 comment

Comments

@vichaunter
Copy link

Just followed your instructions to install it with yarn, but error break script execution.

To be sure, i've just create-react-app, yarn start, and included:

import CookieBanner from "react-cookie-law";

In that moment recompiled app breaks:
Failed to compile ./src/App.js Module not found: Can't resolve 'react-cookie-law' in 'C:\Users\vicha\workspace\test\reactapp\src'

To reproduce you just need to create new react app, install the module with yarn, and run yarn start importing the package.

@asarzina
Copy link
Member

I'm sorry, the readme was not updated. Now it is ok.

You should import the library in this way:

import { CookieBanner } from '@palmabit/react-cookie-law';

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

2 participants