Next.js and auth.js, callbakrouteerror

js with auth.js I’m using credentials provider and I’m getting this error when deploying app in server. However in localhost there are no errors. login page looks like this ‘use client’ import { Label } from ‘@/components/ui/label’ import { Button } from ‘@/components/ui/button’ import * as z from ‘zod’ import { useForm } from ‘react-hook-form’ … Read more

How best to test for an empty (null) component in Vitest?

I have a React component which, when given badly configured props, returns null screen.debug() in Vitest displays the result like this: <body> <div /> </body> This is expected, but what constitutes a good test for this markup? Currently I’m testing the absence of tags that would be present if the component returned a JSX element. … Read more

Understanding scikit learn import variants

Scikit learn import statements in their tutorials are on the form from sklearn.decomposition import PCA Another versions that works is import sklearn.decomposition pca = sklearn.decomposition.PCA(n_components = 2) However import sklearn pca = sklearn.decomposition.PCA(n_components = 2) does not, and complains AttributeError: module ‘sklearn’ has no attribute ‘decomposition’ Why is this, and how can I predict which … Read more

How to upload and store multiple images instead of one image in next-cloudinary and react-hook-form

kI have shadcn/ui Form component look like this “use client”; import { Fragment } from “react”; import type { NextPage } from “next”; import { useRouter } from “next/navigation”; import { zodResolver } from “@hookform/resolvers/zod”; import { useForm } from “react-hook-form”; import * as z from “zod”; import { createProject } from “@/actions/actions”; import { … Read more

Multilingual analyzer with stemming for elastic search

I have an index with the following mapping: { “my_index”: { “mappings”: { “properties”: { “teacher_id”: { “type”: “text”, “fields”: { “keyword”: { “type”: “keyword” } } }, “school_id”: { “type”: “text”, “fields”: { “keyword”: { “type”: “keyword” } } }, “name”: { “type”: “text” }, “height”: { “type”: “text” }, “family_name”: { “type”: “text” … Read more

How to list personal Windows certificates using node? [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed yesterday. Improve this question My goal with this is to find a certificate with … Read more

View component doesn’t update when row is added to list

I have this view with a viewmodel too. I have an issue when I click on the add button the setRowView doesn’t update with a new row. I have tried to change med my @StateObject to an @ObsvervedObject, but that didn’t helped… My SetViewModel is a class which also conform to the ObservableObject. Exercise is … Read more