-
Notifications
You must be signed in to change notification settings - Fork 2
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
[BUG] Fix "Try not defined" #45
Comments
I fixed the problem temporary, downgrading to 1.0.1 because I am just using Either monad in the project. But if someone want to use the new ones, it is needed to solve this issue |
I was trying to fix this issue. In order to work in a clean project, I created a blank one as follows: npx create-next-app@latest my-nextjs-app
cd my-nextjs-app Inside this project, I put the following code inside in the main import { Either } from '@leanmind/monads';
const HomePage = () => {
const right = Either.right(42);
const left = Either.left('Error');
return (
<div>
<p>Right: {right.isRight() ? 'Yes' : 'No'}</p>
<p>Left: {left.isLeft() ? 'Yes' : 'No'}</p>
</div>
);
};
export default HomePage; Workflow to analyze the problemIn order to work quickly, I have been applying the following workflow: 1. In monads repository
2. In the test project with Nextjs
3. Again step 1Experiments performed:
abstract class Try {}
export { Try }; ---> ✅ It works. Effectively, the problem is related to the implementation, something is weird, and it needs a revision |
Describe the bug.
GIVEN the library at v.1.1.0 in a nextjs project
WHEN it is used just the Either and the next build is executed
THEN an error of Try is not defined is raised when the compiler is collecting page data
Expected behavior
No error should be raised
Screenshots
How to Reproduce
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
No, someone else can work on it
The text was updated successfully, but these errors were encountered: