scroll-into-view / scroll-into-view-if-needed

Element.scrollIntoView ponyfills for things like "if-needed" and "smooth"

Home Page:https://scroll-into-view.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Cannot use import statement outside a module" error when using v2.2.31

hardyjosh opened this issue ยท comments

commented

Hi, I'm using Vercel and this package seems to be the root of an error which was causing my serverless function to crash:

"errorMessage":"Cannot use import statement outside a module",
"stack":["/var/task/node_modules/scroll-into-view-if-needed/es/index.js:1",
"import compute from 'compute-scroll-into-view';"

I've rolled back to the below which has fixed my issue. Tbh not entirely sure what the problem is, but leaving this here in case somebody else is having the same problem as me.

"resolutions": {
		"scroll-into-view-if-needed": "2.2.28",
		"compute-scroll-into-view": "^1.0.17"
	 }

๐ŸŽ‰ This issue has been resolved in version 3.0.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€