Error while using uuid library in SvelteKit app
Sebastian Wright
I'm struggling with using uuid library in SvelteKit. When I try to generate UUID then I got this error: "Cannot find module 'uuid' imported from ..."
import { v4 as uuid } from 'uuid';
export async function POST({ request }) { const uuidId = uuid(); // throws "Cannot find module 'uuid' imported from ..." return { };
}I'm using this uuid npm package: @types/[email protected]
2 Related questions 4 How to load Google API client library with SvelteKit Reset to default