error on vue dev: Missing "./dist/types/mask-input" specifier in "maska" package [plugin vite:dep-scan]
ricardovanlaarhoven opened this issue · comments
Describe the bug
on running (p)npm dev with vue and vite the following error is given:
C:/Users/***/WebstormProjects/funders-app/index.html
X [ERROR] Missing "./dist/types/mask-input" specifier in "maska" package [plugin vite:dep-scan]
script:C:/Users/***/WebstormProjects/funders-app/src/shared/modules/form/components/DTextField.vue?id=0:40:7:
40 │ import "maska/dist/types/mask-input"
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/.pnpm/esbuild@0.19.11/node_modules/esbuild/lib/main.js:1293:20:
1293 │ let promise = setup({
╵ ^
Steps to reproduce
With my exisiting installation of my existing project, this error is not thrown, on a clean intall on the same pc and on other pc's and 1 mac i've got this error.
on 2.1.10 and 2.1.11
With a new vue project using the vue installtion guide, this error is also occuring.
I have just released v3-beta. Could you check if this issue still actual?
I'm not having the issue in the OP, but I do have an issue with v3-beta.
I tried the beta, but had to downgrade to v2.1.11.
I kept getting the error that the module or types couldn't be found.
Cannot find module 'maska/vue' or its corresponding type declarations.
@LeanderD could you please show how you include Maska?
For one of my components this is the import I have:
import { vMaska, type MaskOptions } from 'maska/vue';
I'm using PNPM and in .npmrc
I have:
shamefully-hoist=true
Try to import MaskOptions from 'maska':
import { vMaska } from 'maska/vue';
import { type MaskOptions } from 'maska';
I'm sorry for my late reply.
After updating to the latest beta everything is working for me.
Thank you for feedback.