allotment icon indicating copy to clipboard operation
allotment copied to clipboard

Allotment - Typedefinition not found

Open argawow opened this issue 1 year ago • 5 comments

I have changed my React-Project to Vite and now I have problems to import allotment. It works like expected, but when it comes to the production build i get this error

` Could not find a declaration file for module 'allotment'. 'C:/.....s/visualstudio/projekte/....C/client-app/node_modules/allotment/dist/modern.mjs' implicitly has an 'any' type. There are types at 'C:....../client-app/node_modules/allotment/dist/types/src/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'allotment' library may need to update its package.json or typings.

8 import { Allotment, AllotmentHandle } from "allotment";`

Can some help me out here?

argawow avatar Nov 04 '23 08:11 argawow

Same issue here with npm 10.1.0 when using this package in Next.js project.

vojtatom avatar Nov 07 '23 11:11 vojtatom

seems like a duplicate of https://github.com/johnwalley/allotment/issues/669

vojtatom avatar Nov 07 '23 11:11 vojtatom

Looking into this. I've got a variety of Vite and NextJS projects to, hopefully, reproduce this against.

Edit: I see the problem

johnwalley avatar Dec 28 '23 01:12 johnwalley

I'd appreciate it if you could see if v1.19.4 helps?

johnwalley avatar Dec 28 '23 01:12 johnwalley

@johnwalley it's fixed for me (using Next.js v14.0.3)

InsidersByte avatar Jan 03 '24 14:01 InsidersByte