-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
TypeError: element2.getAttribute is not a function
#15336
Comments
element2.getAttribute is not a function
TypeError: element2.getAttribute is not a function
Clearing pnpm store prune
# Removed all cached metadata files
# Removed 5948 files
# Removed 195 packages
Remove-Item -Path "node_modules" -Recurse -Force
Remove-Item -Path ".svelte-kit" -Recurse -Force
pnpm i --force
# WARN using --force I sure hope you know what you are doing
# Lockfile is up to date, resolution step is skipped
# Packages: +431
pnpm dev Using a different version of Svelte does not work: pnpm update svelte
# - svelte 5.19.10
# + svelte 5.20.2
pnpm dev Using npm does not work: npm i
npm run dev Changing the port number does not work: vite dev --port 4173 |
I'm having the same issue, and am similarly puzzled as to what's causing this. I've tried the same steps as mentioned in #15337. I also went back a few svelte versions just to be sure. In my case, this seems to be triggered in a component, but only if I refresh the page. When the component becomes visible through the state it's fine. |
Note
If you face similar issue, please comment on #15337
Describe the bug
On an existing, working SvelteKit project without any errors, this suddenly happens in the browser:
Caution
Uncaught (in promise) TypeError: element2.getAttribute is not a function
This happens on both macOS and Windows.
This is not fixed with
node_modules/.vite
and restarting dev servernode_modules
and reinstalling dependenciesReproduction
Cannot provide reproduction (yet)
System Info
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: