Skip to content

TypescriptError: Can't resolve "Module not found: #61

Answered by igordanchenko
kucingz asked this question in Q&A
Discussion options

You must be logged in to vote

Well, apparently, the solution described here no longer works with YARL v2.

Here is the current workaround to make YARL v2 work with CRA 4 and TypeScript.

import * as React from "react";

import Lightbox, { Plugin } from "yet-another-react-lightbox";
import Thumbnails from "yet-another-react-lightbox/dist/plugins/thumbnails";
import "yet-another-react-lightbox/dist/styles.css";
import "yet-another-react-lightbox/dist/plugins/thumbnails/thumbnails.css";

import slides from "./slides";

function App() {
    const [open, setOpen] = React.useState(false);

    return (
        <div>
            <button type="button" onClick={() => setOpen(true)}>
                Open Lightbox
            </bu…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@igordanchenko
Comment options

Answer selected by igordanchenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants