Skip to content
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

[PrimeVue V4.0.0-beta.1] Cannot find declaration file for module for Aura theme and Primeone base #5615

Open
niek-o opened this issue Apr 19, 2024 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@niek-o
Copy link

niek-o commented Apr 19, 2024

Describe the bug

Typescript can't find declaration modules for "primevue/themes/primeone/aura", "primevue/themes/primeone" and definePreset() fails to import, because it says primevue/themes/index.d.ts is not a module.

Reproducer

https://stackblitz.com/edit/primevue-create-vue-issue-template-ydyslb?file=tsconfig.node.json,tsconfig.json,tsconfig.app.json,package.json,src%2FApp.vue,src%2Fmain.ts

PrimeVue version

4.0.0-beta.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Open stackblitz example
  2. Run npm run build
  3. Build will fail with the following error:
~/projects/primevue-create-vue-issue-template-ydyslb 4s
❯ npm run build

> primevue-create-vue-issue-template@0.0.0 build
> run-p type-check "build-only {@}" --


> primevue-create-vue-issue-template@0.0.0 type-check
> vue-tsc --build --force


> primevue-create-vue-issue-template@0.0.0 build-only
> vite build

vite v5.0.12 building for production...
transforming (258) node_modules/primevue/icons/angledown/index.essrc/main.ts:7:22 - error TS7016: Could not find a declaration file for module 'primevue/themes/primeone'. '/home/projects/primevue-create-vue-issue-template-ydyslb/node_modules/primevue/themes/primeone/index.cjs.js' implicitly has an 'any' type.

7 import PrimeOne from 'primevue/themes/primeone';
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~

src/main.ts:8:18 - error TS7016: Could not find a declaration file for module 'primevue/themes/primeone/aura'. '/home/projects/primevue-create-vue-issue-template-ydyslb/node_modules/primevue/themes/primeone/aura/index.cjs.js' implicitly has an 'any' type.

8 import Aura from 'primevue/themes/primeone/aura';
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/main.ts:9:30 - error TS2306: File '/home/projects/primevue-create-vue-issue-template-ydyslb/node_modules/primevue/themes/index.d.ts' is not a module.

9 import { definePreset } from 'primevue/themes';
                               ~~~~~~~~~~~~~~~~~


Found 3 errors.

npm ERR! code EIO
npm ERR! syscall write
npm ERR! errno -5
npm ERR! EIO: i/o error, write

npm ERR! A complete log of this run can be found in: /home/.npm/_logs/2024-04-19T06_40_03_357Z-debug-0.log
✓ 263 modules transformed.
ERROR: spawn /usr/local/bin/node EIO
npm ERR! code EIO
npm ERR! syscall write
npm ERR! errno -5
npm ERR! EIO: i/o error, write

npm ERR! A complete log of this run can be found in: /home/.npm/_logs/2024-04-19T06_40_02_549Z-debug-0.log
jsh: spawn npm EIO

Expected behavior

The app should not fail to build when building.

@niek-o niek-o added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 19, 2024
@sceee
Copy link

sceee commented May 3, 2024

This duplicates #5521

@mertsincan mertsincan added this to the 4.0.0-beta.3 milestone May 3, 2024
@mertsincan mertsincan self-assigned this May 3, 2024
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 3, 2024
@mertsincan
Copy link
Member

Thanks a lot for your report! I'll fix it for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants