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

ReferenceError: HTMLInputElement is not defined #44

Closed
bokunodev opened this issue Aug 10, 2022 · 5 comments
Closed

ReferenceError: HTMLInputElement is not defined #44

bokunodev opened this issue Aug 10, 2022 · 5 comments

Comments

@bokunodev
Copy link
Contributor

idk why but just recently my sveltekit project broke. updating dependencies and using master branch didn't help.
i'd like to work on this if anybody know, what cause it?

ReferenceError: HTMLInputElement is not defined
    at /node_modules/.pnpm/svelty-picker@2.1.2/node_modules/svelty-picker/custom-element.js:30:15
    at async instantiateModule (file:///home/smkti/Public/go-sandbox/dhugie-gui/node_modules/.pnpm/vite@3.0.5/node_modules/vite/dist/node/chunks/dep-5cb728cb.js:50457:9)
@bokunodev
Copy link
Contributor Author

strange, production build work just fine but npm run dev give me this error.

@mskocik
Copy link
Owner

mskocik commented Aug 10, 2022

Can you provide demo repo with this issue?

@bokunodev
Copy link
Contributor Author

bokunodev commented Aug 10, 2022

i also get this error. but i ignore it.

Could not find a declaration file for module 'svelty-picker'. '/home/smkti/Public/js-sandbox/bug-report/node_modules/.pnpm/svelty-picker@2.1.2/node_modules/svelty-picker/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/svelty-picker` if it exists or add a new declaration (.d.ts) file containing `declare module 'svelty-picker';`js(7016)

step to reproduce

  1. create a fresh sveltekit project pnpm create svelte@next name
  2. install svelty-picker pnpm i svelty-picker@latest
  3. use it in index.svelte
<script>
	import SveltyPicker from 'svelty-picker';
</script>

<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>

<SveltyPicker />
  1. run dev server pnpm run dev

what strange is that pnpm run build and pnpm run preview work just fine, no error during compile time or runtime.
i'm using pnpm. but it should not matter. but i've tried both anyway and the result is the same.

@bokunodev
Copy link
Contributor Author

i can push it to github if needed.

@mskocik
Copy link
Owner

mskocik commented Aug 10, 2022

Okay, I was able to fix it, also the error about SveltyPicker types. Hopefully it's good now also for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants