"Cannot use import statement outside a module" error when using v2.2.31
hardyjosh opened this issue ยท comments
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 ๐ฆ๐