Typescript error
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 78
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Using the example https://stackblitz.com/edit/datatables-net-vue3-bootstrap5?file=src%2FApp.vue works fine while i am running "npm run dev" but when i run "npm run build" i get this error:
src/components/dashboard/Users.vue:6:26 - error TS2306: File '/var/www/html/public-dev/node_modules/datatables.net-bs5/types/dataTables.bootstrap5.d.ts' is not a module.
6 import DataTableBs5 from 'datatables.net-bs5';
~~~~~~~~~~~~~~~~~~~~
Found 1 error in src/components/dashboard/Users.vue:6
I am using vitejs, vuejs 3 and typescript. The "types/dataTables.bootstrap5.d.ts" file is empty
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the import in src/components/dashboard/Users.vue and inspect the empty node_modules/datatables.net-bs5/types/dataTables.bootstrap5.d.ts file. Reproduce the issue with npm run build and determine what change is needed so the TypeScript build accepts the DataTables import without the TS2306 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100